mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 05:04:24 +03:00
handle I;16 native endianness on big-endian machine
This commit is contained in:
parent
79c9b2b261
commit
c56c8901b7
|
@ -1578,7 +1578,17 @@ if (PySequence_Check(op)) { \
|
|||
int bigendian = 0;
|
||||
if (image->type == IMAGING_TYPE_SPECIAL) {
|
||||
// I;16*
|
||||
bigendian = strcmp(image->mode, "I;16B") == 0;
|
||||
if (strcmp(image->mode, "I;16N") == 0) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
bigendian = 1;
|
||||
#else
|
||||
bigendian = 0;
|
||||
#endif
|
||||
} else if (strcmp(image->mode, "I;16B") == 0) {
|
||||
bigendian = 1;
|
||||
} else {
|
||||
bigendian = 0;
|
||||
}
|
||||
}
|
||||
for (i = x = y = 0; i < n; i++) {
|
||||
set_value_to_item(seq, i);
|
||||
|
|
Loading…
Reference in New Issue
Block a user