[Gimp-user] problem with image conversion script

Octavi Fors ofors at am.ub.es
Mon Apr 7 08:47:15 PDT 2008


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 <
pere at fornol.no-ip.org> 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: ofors at am.ub.es , skype:octavi.fors
Tel: +34 93 4039233 , Fax: +34 934021133
-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-user/attachments/20080407/cc606d60/attachment.html 


More information about the Gimp-user mailing list