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
problem converting .fit to .jpg/.gif
Moderators: XnTriq, helmut, xnview
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: problem converting .fit to .jpg/.gif
I think you have to tell nconvert which format to convert to by using the -out option:gabri wrote:./nconvert -o good.jpg good.fit
./nconvert -o good.jpg -out jpg good.fit
FAQ "How to use nconvert" provides interesting infos.
-
- Posts: 3
- Joined: Sun Jun 11, 2006 12:29 am
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
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