Re: [Image-SIG] python PIL 16-bit tiff files

2010-04-25 Thread Fredrik Lundh
I'm afraid you need to rebuild the _imaging module; the patch touches libImaging/Unpack.c too (without that, you can only read big-endian 48-bit RGB files; that is, files that start with MM instead of II). On Sun, Apr 25, 2010 at 5:53 PM, Dan Blacker wrote: > Hi Fredrik, > > Thanks for taking a

Re: [Image-SIG] python PIL 16-bit tiff files

2010-04-25 Thread Dan Blacker
Hi Fredrik, Thanks for taking a look at this, I have downloaded the latest PIL source and installed it, and replaced the TiffImagePlugin.py that was in pyShared with the latest one. When running my script, I no longer get errors when reading my 16-bit tiff file in. I do however now get an error

Re: [Image-SIG] PIL and NumPy

2010-04-25 Thread Yury V. Zaytsev
On Thu, 2010-04-22 at 23:19 -0700, Justin Chudgar wrote: > however, I get gibberish for an output image even if I attempt to > write my original arrays back. Can someone kindly point me to the > appropriate documentation on this so I can RTFM. What do you mean by gibberish? Maybe you need to tra

[Image-SIG] PIL and NumPy

2010-04-25 Thread Justin Chudgar
I'm trying to find some documentation about the methods used to convert Image objects to arrays and back. The following methods seem to work im = Image.open('monkey.jpg') ar = numpy.asarray(im) ... outim = Image.fromarray(outar) outim.save('redmonkey.jpg') however, I get gibberish for an output

Re: [Image-SIG] Radius bug with GaussianBlur

2010-04-25 Thread Fredrik Lundh
On Mon, Mar 1, 2010 at 10:49 PM, Stani wrote: > Strange indeed. The same is true for UnsharpMask: More silly than strange, I'd say -- looks like a cut-and-paste-propagated typo that weren't caught by the (rather shallow) filter tests. Trivial patch here: http://hg.effbot.org/pil-2009-raclet

Re: [Image-SIG] python PIL 16-bit tiff files

2010-04-25 Thread Fredrik Lundh
Oops, that patch was broken, due to pilot error. Here's an incremental fix: http://hg.effbot.org/pil-2009-raclette/changeset/c3fb89aa181e Alternatively, just grab the latest PIL/TiffImagePlugin.py and libImaging/Unpack.c and drop them on top of the existing versions. On Sun, Apr 25, 2010 at 1

Re: [Image-SIG] python PIL 16-bit tiff files

2010-04-25 Thread Fredrik Lundh
This isn't really a full solution, but the following patch at least allows PIL to read 3x16-bit RGB TIFF files, converting them on the fly to 24-bit RGB. Note that it requires new binaries to handle little endian (intel) files: http://hg.effbot.org/pil-2009-raclette/changeset/45c2debe0fc3 Unfort

Re: [Image-SIG] bug in PIL 1.1.7 Image.split()

2010-04-25 Thread Fredrik Lundh
A patch for this can be found here: http://hg.effbot.org/pil-2009-raclette/changeset/fb7ce579f5f9 On Fri, Dec 11, 2009 at 12:55 AM, Fredrik Lundh wrote: > Good catch. The breakage is caused by a 1.1.7 fix that treats > single-band images as a special case; unfortunately, the fix checks > t