Set alpha channel for OpenJPEG

This commit is contained in:
Andrew Murray 2023-02-02 20:52:50 +11:00
parent 569751e454
commit b3af769c1a

View File

@ -487,6 +487,10 @@ j2k_encode_entry(Imaging im, ImagingCodecState state) {
goto quick_exit;
}
if (strcmp(im->mode, "RGBA") == 0) {
image->comps[3].alpha = 1;
}
opj_set_error_handler(codec, j2k_error, context);
opj_set_info_handler(codec, j2k_warn, context);
opj_set_warning_handler(codec, j2k_warn, context);