use mode structs in Filter.c

This commit is contained in:
Yay295 2024-04-21 19:31:50 -05:00
parent d2e691c788
commit 90ea0609df

View File

@ -155,9 +155,9 @@ ImagingFilter3x3(Imaging imOut, Imaging im, const float *kernel, float offset) {
} else {
int bigendian = 0;
if (im->type == IMAGING_TYPE_SPECIAL) {
if (strcmp(im->mode, "I;16B") == 0
if (im->mode == IMAGING_MODE_I_16B
#ifdef WORDS_BIGENDIAN
|| strcmp(im->mode, "I;16N") == 0
|| im->mode == IMAGING_MODE_I_16N
#endif
) {
bigendian = 1;
@ -308,9 +308,9 @@ ImagingFilter5x5(Imaging imOut, Imaging im, const float *kernel, float offset) {
} else {
int bigendian = 0;
if (im->type == IMAGING_TYPE_SPECIAL) {
if (strcmp(im->mode, "I;16B") == 0
if (im->mode == IMAGING_MODE_I_16B
#ifdef WORDS_BIGENDIAN
|| strcmp(im->mode, "I;16N") == 0
|| im->mode == IMAGING_MODE_I_16N
#endif
) {
bigendian = 1;