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 < [EMAIL PROTECTED]> 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: [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