image-processing icon indicating copy to clipboard operation
image-processing copied to clipboard

Update alpha handling when we're ready to deprecate Kakadu v7

Open mel-mason opened this issue 1 year ago • 0 comments

From the kakadu change notes:

Changes from KDU-8.0.5 to KDU-8.0.6 ... e) Corrected the accidental assignment of TIFF tag code 1 to the constant `KDU_TIFF_ExtraSamples_UNASSOCIATED_ALPHA', as opposed to 2, which resulted in PREMULTIPLIED and UNASSOCIATED alpha channels being confused when reading/writing TIFF files. After fixing this error and making some associated changes in "kdu_compress", "kdu_expand" and "kdu_v_compress", all these demo-apps (and now "kdu_v_expand" also) correctly read/write TIFF files with both premultiplied and unassociated alpha channels, without the need for command-line hints like "-jp2_alpha".

This suggests that we can remove the warnings about unassociated alpha channels on the check suitable for jp2 conversion method, and also perhaps remove the jp2_alpha argument added when converting RGBA files. (It may still be necessary for RGBX files).

As is the code works with both v7.10 and the latest v8.4, so I think it's best to leave as is for now.

mel-mason avatar Mar 21 '24 15:03 mel-mason