Add better check for DXT1 with alpha

This commit is contained in:
REDxEYE 2022-08-13 23:46:02 +03:00
parent b7a589475d
commit ed70519396

View File

@ -124,7 +124,7 @@ encode_bc1(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
UINT8 *dst = buf;
UINT8 no_alpha = 0;
INT32 block_index;
if (strchr(im->mode, 'A') == NULL) {
if (strcmp(((BCNSTATE *)state->context)->pixel_format, "DXT1A") != 0) {
no_alpha = 1;
}
INT32 block_count = (im->xsize * im->ysize) / 16;