libultrahdr icon indicating copy to clipboard operation
libultrahdr copied to clipboard

Support encoding linear half float images

Open cgohlke opened this issue 1 year ago • 2 comments

As mentioned in discussion #143 and issue #268, it would be nice to be able to encode linear half float (16-bit float) images.

Passing a raw image with img.fmt=UHDR_IMG_FMT_64bppRGBAHalfFloat, img.ct=UHDR_CT_LINEAR, and intent=UHDR_HDR_IMG to the uhdr_enc_set_raw_image function currently (version 1.1.1) fails with 'unsupported input pixel format for hdr intent 4, expects one of {UHDR_IMG_FMT_24bppYCbCrP010, UHDR_IMG_FMT_32bppRGBA1010102}'.

cgohlke avatar Sep 18 '24 21:09 cgohlke

concur, this would be very helpful to have 16-bit linear half float RGB support

gregbenz avatar Sep 24 '24 05:09 gregbenz

Yes, would be good to have, but more for reading not writing.

I needed some format which can easily written by open source tools and used in my #292 RGB int 16+16+16, but RGBA float 16+16+16 or RGBA float 16+16+16+16 would also be fine for me.

Example to write it: magick infile.tif -depth 16 -define quantum:format=floating-point RGB:outfile.raw Or for 16+16+16+16 with alpha channel use RGBA:outfile.raw.

isenberg avatar Sep 28 '24 17:09 isenberg

Thank you!

gregbenz avatar Oct 31 '24 17:10 gregbenz