mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
jpegxl: Tell libjxl to decode unpremultiply alpha if needed
On some platforms our bitmap format does not use premultiplied alpha.
This commit is contained in:
parent
6fa4c04dea
commit
d59f30c683
@ -103,6 +103,15 @@ jpegxl_cache_convert(struct content *c)
|
|||||||
NSLOG(netsurf, ERROR, "Unable to allocate decoder");
|
NSLOG(netsurf, ERROR, "Unable to allocate decoder");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
decstatus = JxlDecoderSetUnpremultiplyAlpha(jxldec, !bitmap_fmt.pma);
|
||||||
|
if (decstatus != JXL_DEC_SUCCESS) {
|
||||||
|
NSLOG(netsurf, ERROR, "unable to set premultiplied alpha status: %d",
|
||||||
|
decstatus);
|
||||||
|
JxlDecoderDestroy(jxldec);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
decstatus= JxlDecoderSubscribeEvents(jxldec, JXL_DEC_FULL_IMAGE);
|
decstatus= JxlDecoderSubscribeEvents(jxldec, JXL_DEC_FULL_IMAGE);
|
||||||
if (decstatus != JXL_DEC_SUCCESS) {
|
if (decstatus != JXL_DEC_SUCCESS) {
|
||||||
NSLOG(netsurf, ERROR, "Unable to subscribe");
|
NSLOG(netsurf, ERROR, "Unable to subscribe");
|
||||||
|
Loading…
Reference in New Issue
Block a user