Replies: 3 comments
-
We probably have to extend |
Beta Was this translation helpful? Give feedback.
-
Would it make sense to extend the plugin API for this? I think JPEG 2000 can do an alpha channel inline, and if we want to wrap something like JPEG-XL in the future, that could also be a consideration. While we can get information from the |
Beta Was this translation helpful? Give feedback.
-
Yes. My plan is to refactor But for the moment, we can just add this to
Maybe. I also have added h265 decoding with embedded alpha stream some time ago to libde265. I've never seen this used for HEIC images, but there are some video streams coded like this and it might also be valid for HEIF. |
Beta Was this translation helpful? Give feedback.
-
It looks like the alpha channel is generally handled as an auxiliary image. In the external API, it appears that
heif_image_handle_has_alpha_channel()
can return false even if there is an available alpha channel. I think this is the case I'm hitting for the uncompressed codec, where the alpha component can be mixed in with the other values (pixel, component, row, etc).Should
HeifContext::has_alpha
check for an inline channel (e.g. callHeifPixelImage::has_channel(heif_channel_Alpha)
- although maybe it should also check for interleave with aheif_chroma
value that includes alpha)? Or should the check be deeper (e.g. haveget_alpha_channel()
also check for an inline channel, and construct the required Image)?I see there was earlier work at #708. This seems related but distinct, allowing for the comments at
libheif/libheif/heif.cc
Lines 827 to 841 in e4d554a
Beta Was this translation helpful? Give feedback.
All reactions