mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-27 15:44:46 +03:00
Merge 3732344571
into fd67647901
This commit is contained in:
commit
e3d495de46
BIN
Tests/images/16bit.s.tif
Normal file
BIN
Tests/images/16bit.s.tif
Normal file
Binary file not shown.
|
@ -198,6 +198,11 @@ class TestFileTiff(PillowTestCase):
|
||||||
self.assertEqual(b[0], b'\x01')
|
self.assertEqual(b[0], b'\x01')
|
||||||
self.assertEqual(b[1], b'\xe0')
|
self.assertEqual(b[1], b'\xe0')
|
||||||
|
|
||||||
|
def test_16bit_s(self):
|
||||||
|
im = Image.open('Tests/images/16bit.s.tif')
|
||||||
|
im.load()
|
||||||
|
self.assertEqual(im.mode, 'I;16S')
|
||||||
|
|
||||||
def test_12bit_rawmode(self):
|
def test_12bit_rawmode(self):
|
||||||
""" Are we generating the same interpretation
|
""" Are we generating the same interpretation
|
||||||
of the image as Imagemagick is? """
|
of the image as Imagemagick is? """
|
||||||
|
|
|
@ -227,6 +227,7 @@ ImagingAccessInit()
|
||||||
ADD("I;16", line_16, get_pixel_16L, put_pixel_16L);
|
ADD("I;16", line_16, get_pixel_16L, put_pixel_16L);
|
||||||
ADD("I;16L", line_16, get_pixel_16L, put_pixel_16L);
|
ADD("I;16L", line_16, get_pixel_16L, put_pixel_16L);
|
||||||
ADD("I;16B", line_16, get_pixel_16B, put_pixel_16B);
|
ADD("I;16B", line_16, get_pixel_16B, put_pixel_16B);
|
||||||
|
ADD("I;16S", line_16, get_pixel_16L, put_pixel_16L);
|
||||||
ADD("I;32L", line_32, get_pixel_32L, put_pixel_32L);
|
ADD("I;32L", line_32, get_pixel_32L, put_pixel_32L);
|
||||||
ADD("I;32B", line_32, get_pixel_32B, put_pixel_32B);
|
ADD("I;32B", line_32, get_pixel_32B, put_pixel_32B);
|
||||||
ADD("F", line_32, get_pixel_32, put_pixel_32);
|
ADD("F", line_32, get_pixel_32, put_pixel_32);
|
||||||
|
|
|
@ -115,7 +115,7 @@ ImagingNewPrologueSubtype(const char *mode, int xsize, int ysize, int size)
|
||||||
im->linesize = xsize * 4;
|
im->linesize = xsize * 4;
|
||||||
im->type = IMAGING_TYPE_INT32;
|
im->type = IMAGING_TYPE_INT32;
|
||||||
|
|
||||||
} else if (strcmp(mode, "I;16") == 0 || strcmp(mode, "I;16L") == 0 \
|
} else if (strcmp(mode, "I;16") == 0 || strcmp(mode, "I;16L") == 0 || strcmp(mode, "I;16S") == 0 \
|
||||||
|| strcmp(mode, "I;16B") == 0 || strcmp(mode, "I;16N") == 0) {
|
|| strcmp(mode, "I;16B") == 0 || strcmp(mode, "I;16N") == 0) {
|
||||||
/* EXPERIMENTAL */
|
/* EXPERIMENTAL */
|
||||||
/* 16-bit raw integer images */
|
/* 16-bit raw integer images */
|
||||||
|
|
|
@ -1405,6 +1405,7 @@ static struct {
|
||||||
/* storage modes */
|
/* storage modes */
|
||||||
{"I;16", "I;16", 16, copy2},
|
{"I;16", "I;16", 16, copy2},
|
||||||
{"I;16B", "I;16B", 16, copy2},
|
{"I;16B", "I;16B", 16, copy2},
|
||||||
|
{"I;16S", "I;16S", 16, copy2},
|
||||||
{"I;16L", "I;16L", 16, copy2},
|
{"I;16L", "I;16L", 16, copy2},
|
||||||
|
|
||||||
{"I;16", "I;16N", 16, unpackI16N_I16}, // LibTiff native->image endian.
|
{"I;16", "I;16N", 16, unpackI16N_I16}, // LibTiff native->image endian.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user