mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-23 07:10:33 +03:00
Add better check for DXT1 with alpha
This commit is contained in:
parent
b7a589475d
commit
ed70519396
|
@ -121,10 +121,10 @@ get_closest_color_index(const UINT16 *colors, UINT16 color) {
|
||||||
|
|
||||||
int
|
int
|
||||||
encode_bc1(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
|
encode_bc1(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
|
||||||
UINT8* dst = buf;
|
UINT8 *dst = buf;
|
||||||
UINT8 no_alpha = 0;
|
UINT8 no_alpha = 0;
|
||||||
INT32 block_index;
|
INT32 block_index;
|
||||||
if (strchr(im->mode, 'A') == NULL) {
|
if (strcmp(((BCNSTATE *)state->context)->pixel_format, "DXT1A") != 0) {
|
||||||
no_alpha = 1;
|
no_alpha = 1;
|
||||||
}
|
}
|
||||||
INT32 block_count = (im->xsize * im->ysize) / 16;
|
INT32 block_count = (im->xsize * im->ysize) / 16;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user