FCL-image , add possibility to read/write TIFF images in floating point format

Summary

< Add possibility to read/write TIFF images in floating point format, colour and gray-level. As already discussed in #41022 (closed), changing the storage system 4 word-sized values (RGBA) is out of the question. Therefore I have created the attached unit to store 3 or 4 floats into RGBA using a smaller floating-point format then usual. I have also added two sample images but can add more in the future.

For gray-level images I could add to the unit the possibility for a gray-level image the store the full precision IEE754 floating-point values in RGBA.

Some background information why floating-point format is useful: 32 bit float images are used in astronomy when images are stacked. Processed astronomical image require a huge dynamic because the faint object produce only a few photons or less per second. This hardly raises the pixel values in a single image. To image an astronomical object you take hundreds of exposures of a few minutes and then later stack them. Total effective exposure time will then be hours.

Stars flux will fit in the 16 bit image sensor range 0..65535 but faint clouds will raise the pixel value with maybe one or two. Lets say a faint cloud increased the pixel value from 1000 to 1002. This means only 3 values are recorded for the cloud. If you stack 100 16-bit images into floating point values you could will increase the dynamic range of the cloud values to 300 values in the floating range 1000.0 to 1002.0. Then by stretching you will get the fine cloud details in gray-levels but still preserve the star flux values. So the raw stack output will be an floating point image. This is typically stored in a FITS file.

FITS image files support floating point values but having the same possibility for TIFF files with compression in FCL-image is nice to have. Most other TIFF libraries support floating point values. I assume there are other technical arguments for it I'm not aware of.

This old document describes it nicely for FITS files: https://fits.gsfc.nasa.gov/fp89.txt >

System Information

Example Project

<float_to_rgba.zip

Sample images sample_image_32_bit_float.zip

Relevant 3rd party information

<>