mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
fix ImagingAccess for I;16N on big-endian
This commit is contained in:
parent
0fed6a5fbc
commit
da7198c987
|
@ -81,12 +81,6 @@ get_pixel_16B(Imaging im, int x, int y, void *color) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
get_pixel_16(Imaging im, int x, int y, void *color) {
|
|
||||||
UINT8 *in = (UINT8 *)&im->image[y][x + x];
|
|
||||||
memcpy(color, in, sizeof(UINT16));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_pixel_BGR15(Imaging im, int x, int y, void *color) {
|
get_pixel_BGR15(Imaging im, int x, int y, void *color) {
|
||||||
UINT8 *in = (UINT8 *)&im->image8[y][x * 2];
|
UINT8 *in = (UINT8 *)&im->image8[y][x * 2];
|
||||||
|
@ -207,7 +201,11 @@ ImagingAccessInit() {
|
||||||
ADD("I;16", get_pixel_16L, put_pixel_16L);
|
ADD("I;16", get_pixel_16L, put_pixel_16L);
|
||||||
ADD("I;16L", get_pixel_16L, put_pixel_16L);
|
ADD("I;16L", get_pixel_16L, put_pixel_16L);
|
||||||
ADD("I;16B", get_pixel_16B, put_pixel_16B);
|
ADD("I;16B", get_pixel_16B, put_pixel_16B);
|
||||||
ADD("I;16N", get_pixel_16, put_pixel_16L);
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
ADD("I;16N", get_pixel_16B, put_pixel_16B);
|
||||||
|
#else
|
||||||
|
ADD("I;16N", get_pixel_16L, put_pixel_16L);
|
||||||
|
#endif
|
||||||
ADD("I;32L", get_pixel_32L, put_pixel_32L);
|
ADD("I;32L", get_pixel_32L, put_pixel_32L);
|
||||||
ADD("I;32B", get_pixel_32B, put_pixel_32B);
|
ADD("I;32B", get_pixel_32B, put_pixel_32B);
|
||||||
ADD("F", get_pixel_32, put_pixel_32);
|
ADD("F", get_pixel_32, put_pixel_32);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user