You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to save 16-bit data into a TIFF with CMYK color space applied, it outputs as 8-bit instead.
OpenImageIO version and dependencies
2.4.11.0
To Reproduce
Steps to reproduce the behavior:
Create an ImageSpec with UINT16 format, and tiff:ColorSpace set to "CMYK"
Open ImageOutput with the spec
Write 16-bit data to it
Output file is 8-bit
Not sure how to reproduce this flow in oiiotool, but if someone can give me a command that does this I can try it out.
Evidence
Cannot attach specific images, but exiftool, Mac Preview, and Photoshop all confirm that the output is 8-bit.
IF YOU ALREADY HAVE A CODE FIX: There is no need to file a separate issue,
please just go straight to making a pull request.
I do not have a code fix specifically, but mainly opening this as a question on a portion of code I think is causing this. Specifically, this if statement will evaluate to true no matter what format is:
Because of this everything is getting converted to 8-bit. However, I'm not sure if it's trying to do this on purpose because there doesn't seem to be any handling for 16-bit values.
For reference, this is what my potential fix would be, but I am not in a position to test this properly right now and probably won't be soon which is why this is not a PR.
Describe the bug
When trying to save 16-bit data into a TIFF with CMYK color space applied, it outputs as 8-bit instead.
OpenImageIO version and dependencies
2.4.11.0
To Reproduce
Steps to reproduce the behavior:
tiff:ColorSpace
set to "CMYK"Not sure how to reproduce this flow in oiiotool, but if someone can give me a command that does this I can try it out.
Evidence
Cannot attach specific images, but exiftool, Mac Preview, and Photoshop all confirm that the output is 8-bit.
IF YOU ALREADY HAVE A CODE FIX: There is no need to file a separate issue,
please just go straight to making a pull request.
I do not have a code fix specifically, but mainly opening this as a question on a portion of code I think is causing this. Specifically, this if statement will evaluate to true no matter what format is:
OpenImageIO/src/tiff.imageio/tiffoutput.cpp
Lines 721 to 722 in 24f172a
Because of this everything is getting converted to 8-bit. However, I'm not sure if it's trying to do this on purpose because there doesn't seem to be any handling for 16-bit values.
For reference, this is what my potential fix would be, but I am not in a position to test this properly right now and probably won't be soon which is why this is not a PR.
The text was updated successfully, but these errors were encountered: