question

PierreChatelier-6741 avatar image
0 Votes"
PierreChatelier-6741 asked AminDodin-1022 answered

System::Windows::Media::Imaging::TiffBitmapEncoder does not support Gray32Float Pixelformat

When using System::Windows::Media::Imaging::TiffBitmapEncoder, it seems that a Gray32Float on input will generate a Gray16 Pixelformat on output, thus losing information.
Is there a workaround ?
It tried to change the Compression property, without any success.

I have a minimal project to reproduce https://chachatelier.fr/tmp/TestWindowsMediaTIFF.zip

[edit]
I would not care if I could avoid reencoding such an image, but I need to edit metadata and I did not find any way to edit metadata in place without decoding first

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
0 Votes"
Castorix31 answered

You can see this thread : Can't seem to save a 32-bit grayscale tiff


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AminDodin-1022 avatar image
0 Votes"
AminDodin-1022 answered

If you need to properly decode the 32-bit grayscale image without losing any of the gray shades, you can use the LEADTOOLS document imaging SDK. (Disclosure: I work for the SDK’s vendor).

You can also read and write TIFF tags and comments without decoding or re-encoding the image data itself. This is explained in the .NET tutorial Read and Write TIFF Tags and Comments

If you would like to try the LEADTOOLS classes, you can download the free evaluation from this page.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.