Page 1 of 1

problem converting .fit to .jpg/.gif

Posted: Sun Jun 11, 2006 12:38 am
by gabri
Hello,
I am trying to convert a .fit file to .jpg or .gif file. Using nconvert:
./nconvert -o good.jpg good.fit, says that the conversion was successful, but I am not able to open the resulting jpg file.
I would really appreciate any help,
Thank you in advance,
Gabri

Re: problem converting .fit to .jpg/.gif

Posted: Sun Jun 11, 2006 12:25 pm
by helmut
gabri wrote:./nconvert -o good.jpg good.fit
I think you have to tell nconvert which format to convert to by using the -out option:

./nconvert -o good.jpg -out jpg good.fit

FAQ "How to use nconvert" provides interesting infos.

Posted: Mon Jun 12, 2006 6:01 am
by gabri
Hi,
Thank you for your reply. Sorry for the so obvious-answer question, it worked out using -out. Unfortunately, I ran in another kind of problem. The fit file I'm trying to convert is created using IEEE 64 bit floating point numbers.

The Fits file header is:
Headers for HDU 1
SIMPLE = T /

Java FITS: Mon Jun 12 00:24:44 CDT

2006
BITPIX = -64
NAXIS = 2 /

Dimensionality
NAXIS1 = 100
NAXIS2 = 100
EXTEND = T /

Extensions are permitted


For trying to convert this i get the following error:
Error: FITS: Bad Bits Per Pixel !

However, the same file stored where each pixel is stored as a short value (instead of a double), which header is:

Headers for HDU 1
SIMPLE = T /

Java FITS: Sun Jun 11 23:10:15 CDT

2006
BITPIX = 16
NAXIS = 2 /

Dimensionality
NAXIS1 = 100
NAXIS2 = 100
EXTEND = T /

Extensions are permitted

works just fine with no errors.

I could not find a way to work around getting the 64 bit FP number version to work as well. Does nconvert support this type of fit file, and would it be possible to convert it to a jpg/gif?

Thanks you so much for any help,
Best,
Gabri