summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/handlers/image/jpegxl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/content/handlers/image/jpegxl.c b/content/handlers/image/jpegxl.c
index d5152fb7a..0451e2a88 100644
--- a/content/handlers/image/jpegxl.c
+++ b/content/handlers/image/jpegxl.c
@@ -103,6 +103,15 @@ jpegxl_cache_convert(struct content *c)
NSLOG(netsurf, ERROR, "Unable to allocate decoder");
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);
if (decstatus != JXL_DEC_SUCCESS) {
NSLOG(netsurf, ERROR, "Unable to subscribe");