recognize a 16bit greyscale format with "white is zero" (which is

generated by some neutron image plate detector) -- PIL is lacking
some infrastructure here so it gets treated like "black is zero"
but this is fine for me because I don't want to interpret it
photometrically anyway
This commit is contained in:
drochner 2010-07-19 17:45:02 +00:00
parent 09b7888024
commit 3bc57359d1
3 changed files with 16 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.36 2010/01/18 09:59:07 wiz Exp $
# $NetBSD: Makefile,v 1.37 2010/07/19 17:45:02 drochner Exp $
DISTNAME= Imaging-1.1.7
PKGNAME= ${PYPKGPREFIX}-imaging-1.1.7
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= graphics python
MASTER_SITES= http://effbot.org/media/downloads/

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.12 2009/12/11 21:37:30 drochner Exp $
$NetBSD: distinfo,v 1.13 2010/07/19 17:45:02 drochner Exp $
SHA1 (python/Imaging-1.1.7.tar.gz) = 76c37504251171fda8da8e63ecb8bc42a69a5c81
RMD160 (python/Imaging-1.1.7.tar.gz) = 9af570fe100e250a4860314341fe3e6d695d7fde
Size (python/Imaging-1.1.7.tar.gz) = 498749 bytes
SHA1 (patch-ab) = 563eff2d51db778711946734871f790643851086
SHA1 (patch-ac) = 2ad2a988c7fdddb34812959ddfd60442282a48ea

View file

@ -0,0 +1,12 @@
$NetBSD: patch-ac,v 1.1 2010/07/19 17:45:03 drochner Exp $
--- PIL/TiffImagePlugin.py.orig 2010-07-19 14:29:50.000000000 +0000
+++ PIL/TiffImagePlugin.py
@@ -131,6 +131,7 @@ OPEN_INFO = {
# (ByteOrder, PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample,
# ExtraSamples) => mode, rawmode
(II, 0, 1, 1, (1,), ()): ("1", "1;I"),
+ (II, 0, 1, 1, (16,), ()): ("I;16", "I;16"),
(II, 0, 1, 2, (1,), ()): ("1", "1;IR"),
(II, 0, 1, 1, (8,), ()): ("L", "L;I"),
(II, 0, 1, 2, (8,), ()): ("L", "L;IR"),