mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-27 16:33:15 +03:00
Set alpha channel when saving LA in OpenJPEG
This commit is contained in:
parent
ea0abb94cc
commit
c108d9ddb0
|
@ -490,6 +490,8 @@ j2k_encode_entry(Imaging im, ImagingCodecState state) {
|
||||||
|
|
||||||
if (strcmp(im->mode, "RGBA") == 0) {
|
if (strcmp(im->mode, "RGBA") == 0) {
|
||||||
image->comps[3].alpha = 1;
|
image->comps[3].alpha = 1;
|
||||||
|
} else if (strcmp(im->mode, "LA") == 0) {
|
||||||
|
image->comps[1].alpha = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_set_error_handler(codec, j2k_error, context);
|
opj_set_error_handler(codec, j2k_error, context);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user