[Gimp-user] problem with image conversion script
Octavi Fors
ofors at am.ub.es
Mon Apr 7 04:27:38 PDT 2008
Thanks Pere!
the script worked fine once I included your tip.
I'm surprised gimp interpreter didn't warn that...
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).
Can I also do this in the same script below?
(define (fits-to-ppm infile
outfile)
(let* ((image (car (file-fits-load
RUN-NONINTERACTIVE
infile
infile
)
)
)
(drawable (car (gimp-image-get-active-layer image)))
)
(file-ppm-save RUN-NONINTERACTIVE image drawable outfile outfile 0)
(gimp-image-delete image)
)
)
Any help on this will be very welcome.
Regards,
Octavi.
On Mon, Apr 7, 2008 at 12:59 PM, Pere Pujal i Carabantes <
pere at fornol.no-ip.org> wrote:
> Hola Octavi!
>
> El dg 06 de 04 del 2008 a les 19:31 +0000, en/na Octavi Fors va
> escriure:
>
> > I want to convert a FITS image into PPM in batch mode.
> > Grabbing code from different sites I end up to a source script version
> > like this:
> >
> > (define (fits-to-ppm infile
> > outfile)
> > (let* ((image (car (file-fits-load
> > RUN-NONINTERACTIVE
> > infile
> > infile
> > )
> > )
> ; Here you lack a ) closing (image
> > (drawable (car (gimp-image-get-active-layer image))))
> >
> > (file-ppm-save RUN-NONINTERACTIVE image drawable outfile outfile 0)
> > (gimp-image-delete image)
> > )
> > )
> Here you should remove the ) added before
> > )
> >
>
>
> > Thanks in advance,
> >
> > Octavi.
>
>
> Hope this helps
> 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/be4e8b29/attachment.html
More information about the Gimp-user
mailing list