From 9d06fa74be29c974ea1e05bbb6a84198c8a41636 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 21 Nov 2013 20:14:06 -0800 Subject: [PATCH] 12 bit tiffs come out as 12 bits from libtiff --- PIL/TiffImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index ffd165c04..9232cb7e3 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -811,7 +811,7 @@ class TiffImageFile(ImageFile.ImageFile): # we're expecting image byte order. So, if the rawmode # contains I;16, we need to convert from native to image # byte order. - if self.mode in ('I;16B', 'I;16'): + if self.mode in ('I;16B', 'I;16') and 'I;16' in rawmode: rawmode = 'I;16N' # Offset in the tile tuple is 0, we go from 0,0 to