[fitsbits] Re: Reading floating point FITS files
Thierry Forveille
forveill at cfht.hawaii.edu
Wed Nov 12 15:14:41 EST 2003
John Green writes:
> 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 you do that with a 32 bit/pixel FITS image you'll get a display, but
definitely not a meaningful one ;-) Integer FITS data are actually fixed
point numbers, not integers. The physical value is obtained by
float=BZERO+BSCALE*integer
> But a -32 bit (32 bit floating point) color depth is something I have
> never heard of. Simply I don't know how to extract the 3 color bytes
> (R,G,B) from the floating point data.
>
> To cut it short: I have just one specific problem: how to extract
> R,G,B data from the -32 bits per pixel FITS images.
>
Please read again what has been said to you, and try to understand it.
To cut it short: FITS IMAGES DO NOT CONTAIN RGB DATA in any hypothesis-free
form.
More information about the fitsbits
mailing list