Pere,

yes! It worked. The script is:

(define (fits-to-ppm infile outfile)
  (let* ((image (car (file-fits-load RUN-NONINTERACTIVE infile infile)))
           (drawable (car (gimp-image-get-active-layer image)))
          )
    (gimp-image-convert-rgb image)
    (file-ppm-save RUN-NONINTERACTIVE image drawable outfile outfile 0)
    (gimp-image-delete image)
  )
)

Thanks so much for helping,

Octavi.

On Mon, Apr 7, 2008 at 5:42 PM, Pere Pujal i Carabantes <
[EMAIL PROTECTED]> wrote:

> Hola Octavi!
>
> El dl 07 de 04 del 2008 a les 13:27 +0200, en/na Octavi Fors va
> escriure:
>
> > Anyway, now the output "mask_gimp.ppm" file is generated. However,
> > this is a greyscale one in ASCII (magic number is P2) and would like
> > to output a color one in ASCII (magic number is P3).
>
> You should insert a (gimp-image-convert-rgb image) before saving.
>
>
> Salut
> Pere
>
>


-- 
--
-------------------------------------------------------
Octavi Fors
Astronomy Department
University of Barcelona
Marti i Franques 1, 08028 Barcelona, Spain
e-mail: [EMAIL PROTECTED] , skype:octavi.fors
Tel: +34 93 4039233 , Fax: +34 934021133
-------------------------------------------------------
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to