Merge pull request #6053 from radarhere/simplified

Simplified code
This commit is contained in:
Hugo van Kemenade 2022-02-14 19:16:39 +02:00 committed by GitHub
commit 7b3f28047f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,9 +1216,7 @@ frompalette(Imaging imOut, Imaging imIn, const char *mode) {
convert = alpha ? pa2f : p2f;
} else if (strcmp(mode, "RGB") == 0) {
convert = alpha ? pa2rgb : p2rgb;
} else if (strcmp(mode, "RGBA") == 0) {
convert = alpha ? pa2rgba : p2rgba;
} else if (strcmp(mode, "RGBX") == 0) {
} else if (strcmp(mode, "RGBA") == 0 || strcmp(mode, "RGBX") == 0) {
convert = alpha ? pa2rgba : p2rgba;
} else if (strcmp(mode, "CMYK") == 0) {
convert = alpha ? pa2cmyk : p2cmyk;