[fitsbits] Re: Reading floating point FITS files

LC's No-Spam Newsreading account nospam at ifctr.mi.cnr.it
Thu Nov 13 03:16:41 EST 2003


On 12 Nov 2003, John Green wrote:

> Thank you so much Rob, but actually I am already able to read and
> display FITS files of 8,16,32 bits per pixel I just fail to do so for
> those of -32, -64 bits per pixel.

I do not understand the difference. If you can take byte values between
0 and 255, short integer values between -32768 and 32767, long integer
values between -2147483648 and 2147483647 and scale them in a range 0-n
corresponding to a lookup table ... you should be able to do the same
for floating point values between +/-1E39 or double float between
+/1E308 !

> My exact problem in reading -32,-64 bits per pixel files is in reading
> the image colors.

there are no such things as image colours in the FITS file, just a
continuous range of measurement values. Colours are only a convention in
the mind of the user !

> I don't face any problem reading 32 bits per pixel files for example
> because it is a standard color depth, any developer involved in
> imaging knows exactly how to deal with it ( just read the 4 bytes,
> extract the 3 bytes related to color: R,G,B and feed them into the
> bitmap )

If THAT is really what your FITS file contain, then whoever wrote them
did something totally unlike what astronomers do !

-- 
----------------------------------------------------------------------
nospam at ifctr.mi.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.




More information about the fitsbits mailing list