Skip to content

Commit b7cb5ec

Browse files
committed
Remove non-image ImageCms modes
1 parent 87e7883 commit b7cb5ec

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

src/_imagingcms.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -235,23 +235,9 @@ findLCMStype(const char *const mode_name) {
235235
);
236236
default:
237237
// This function only accepts a subset of the imaging modes Pillow has.
238-
break;
238+
// presume "1" or "L" by default
239+
return TYPE_GRAY_8;
239240
}
240-
// The following modes are not valid PIL Image modes.
241-
if (strcmp(mode_name, "RGBA;16B") == 0) {
242-
return TYPE_RGBA_16;
243-
}
244-
if (strcmp(mode_name, "L;16") == 0) {
245-
return TYPE_GRAY_16;
246-
}
247-
if (strcmp(mode_name, "L;16B") == 0) {
248-
return TYPE_GRAY_16_SE;
249-
}
250-
if (strcmp(mode_name, "YCCA") == 0 || strcmp(mode_name, "YCC") == 0) {
251-
return TYPE_YCbCr_8;
252-
}
253-
/* presume "1" or "L" by default */
254-
return TYPE_GRAY_8;
255241
}
256242

257243
#define Cms_Min(a, b) ((a) < (b) ? (a) : (b))

0 commit comments

Comments
 (0)