[IPOL discuss] IEEE floating point images

Pascal Getreuer getreuer at gmail.com
Thu Jun 2 04:16:47 CEST 2011


Hi Jerome,

My understanding is that the IPOL io_tiff library is currently limited
internally to reading and writing with 8-bit data.

For reading, it uses libtiff's simple TIFFReadRGBAImage function to
read the data.  This function reads and converts all data formats to
red-green-blue-alpha using 8 bits per component.  The read_tiff_f32
function then converts the 8-bit data to 32-bit floating point.  I
believe the process for writing is similar, that write_tiff_f32 first
converts down to 8-bit data and then calls libtiff to write the file.

So to read and write 32-bit floating point data, I think you need to
call libtiff directly: the key functions for this are

   TIFFReadScanline
   http://linux.die.net/man/3/tiffreadscanline

and

   TIFFWriteScanline
   http://linux.die.net/man/3/tiffwritescanline

Best,
Pascal


On Wed, Jun 1, 2011 at 21:06, Jerome Darbon <darbon at cmla.ens-cachan.fr> wrote:
> Hi,
>    I'd like to save and read images that have IEEE single floating
> point values through IPOL.
>
> I am using the reading and writing functions ("write_tiff_f32()")
> provided by IPOL. Does anyone if it is fine ?
>
> Also, I understand that using "1x8i" or "3x8i" for "input_dtype" in app.py
> corresponds to using 8-bit gray-scale or 3x8-bit color images. Does that
> mean that all images are converted to 8-bit-kind images?
>
> Does anyone have a simple solution?
>
> Regards,
> jerome
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> discuss mailing list
> discuss at list.ipol.im
> http://tools.ipol.im/mailman/listinfo/discuss
>


More information about the discuss mailing list