From aarora99 at gmail.com Thu Feb 3 17:27:21 2011 From: aarora99 at gmail.com (Anjali Arora) Date: Thu, 3 Feb 2011 11:27:21 -0500 Subject: [Image-SIG] 'Upload a valid image' errors with PIL 1.1.7/ Python 2.6/ Mac 10.6.2 Message-ID: Hi, I am struggling with this for the past 2 days: first I got the above error, & googled around to find that I needed the libjpeg module as well, so I re-installed the lot, first libjpeg & then PIL; got a couple errors like JPEG decoder not available etc, fixed that. Now it passes the selftest, but when I try to upload images via the admin site, it throws up the error "Upload a valid image. The file you uploaded was either not an image or a corrupted image." Any help is appreciated. Thanks. -Ara -------------- next part -------------- An HTML attachment was scrubbed... URL: From aarora99 at gmail.com Thu Feb 3 17:30:19 2011 From: aarora99 at gmail.com (Anjali Arora) Date: Thu, 3 Feb 2011 11:30:19 -0500 Subject: [Image-SIG] Fwd: 'Upload a valid image' errors with PIL 1.1.7/ Python 2.6/ Mac 10.6.2/ Django 1.2.3 Message-ID: I'm sorry, by admin site below, I mean Django Admin site. Hi, I am struggling with this for the past 2 days: first I got the above error, & googled around to find that I needed the libjpeg module as well, so I re-installed the lot, first libjpeg & then PIL; got a couple errors like JPEG decoder not available etc, fixed that. Now it passes the selftest, but when I try to upload images via the admin site, it throws up the error "Upload a valid image. The file you uploaded was either not an image or a corrupted image." Any help is appreciated. Thanks. -Ara -------------- next part -------------- An HTML attachment was scrubbed... URL: From echowit at aol.com Sat Feb 5 00:10:38 2011 From: echowit at aol.com (echowit at aol.com) Date: Fri, 4 Feb 2011 18:10:38 -0500 (EST) Subject: [Image-SIG] PIL bug. decodestring Message-ID: <8CD92D7DEDB5170-8E8-3CE09@angweb-usd004.sysops.aol.com> Am trying out PIL 1.1.7 w/ Py 3.1.2 and had a draw.text problem. To wit: something ref'ing ImageFont.py about 'decodestring' being depreciated. Replaced ~string w/ 'decodebytes' in lines 261 and 353 and all is well. "decodestring" also appears in a text string in lines 386 & 388 but, of course, doesn't mess anything up but the meaning of the message, wherever it may appear. .. if it appears, have yet to see it. PIL is fantastically easy to use and seems very powerfull so far. I'm basically a numbers guy so am real weak at output formatting etc.. So researching various plot & picture add-ons had me in dread -- can they devise schema any more complicated than the current direction -- package 1 to mod the data, add-on 2 to format for screen or file, module X to actually output it. Then buy the viewer! G**d G*d, it's only 2-dimensions. In other words, I like what you've done with this. Looking forward to 1.2. Please remember us 3.1.. Py types. Larry Rochester aka, echowit at aol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From koosdenhouting at gmail.com Sun Feb 6 21:25:32 2011 From: koosdenhouting at gmail.com (Koos den Houting) Date: Sun, 6 Feb 2011 21:25:32 +0100 Subject: [Image-SIG] PIL Message-ID: <7C22D4122BC14410934B3322CBC3E1B3@PCOLGA> Dear Sir I do have 2 pythons installed on my computer 2.6 and 3.1 PIL is available for 2.6 only but when I do click on the 2.6 suppoetws PIL I do get an unregistred copy that?s not true but the most awfull is that I cannot type a directory PYTHON26 in the next screen (you cannot type on that screen) By the way whats the recoomendation for the install library (if I can type) Kind regards Koos den Houting -------------- next part -------------- An HTML attachment was scrubbed... URL: From Allen.Windhorn at emerson.com Mon Feb 7 22:39:43 2011 From: Allen.Windhorn at emerson.com (Allen.Windhorn at emerson.com) Date: Mon, 7 Feb 2011 15:39:43 -0600 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: References: Message-ID: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> Greetings: This is a question probably more related to machine vision, but I want to digitize a lot of hand-drawn graphs that we have accumulated over the years. I would like to scan them, have a clerical person select a line on the graph (maybe in several spots), and get back a set of XY coordinates of the line. (A bonus would be to select points on the axes and enter the values to automatically do scaling.) To confound the process, there is a grid on the image, and there are several lines which may cross each other at various angles. My first thought is someone must have had this problem before and solved it -- if so, can I adapt your solution? (There was a product available commercially, but it didn't work worth a darn.) If not, can anyone suggest an approach? My first thought is to set an image threshold to convert it to ones and zeros, then do some kind of line-following algorithm that would take guidance from a human being. Fortunately, the desired data form smooth curves. It will be hard to discriminate between the line and the grid though. Regards, Allen -- Allen Windhorn, P.E. (MN), CEng (507) 345-2782 Kato Engineering P.O. Box 8447, N. Mankato, MN 56002 Allen.Windhorn at emerson.com From edward at unicornschool.org Tue Feb 8 00:12:06 2011 From: edward at unicornschool.org (Edward Cannon) Date: Mon, 7 Feb 2011 15:12:06 -0800 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> Message-ID: There was a discussion about a related problem a few months back, and the general consensus was: not really possible. I have done things like this, very time consuming, limited accuracy. If you want to scan the data and use it in a document, probably OK. Attempting to retrieve data from the graph, you will loose lots of precision. I would suggest that you get data from original sources if you can. If you can't, too bad. Edward Cannon On Mon, Feb 7, 2011 at 1:39 PM, wrote: > Greetings: > > This is a question probably more related to machine vision, but I want > to digitize a lot of hand-drawn graphs that we have accumulated over > the years. ?I would like to scan them, have a clerical person select a > line on the graph (maybe in several spots), and get back a set of XY > coordinates of the line. ?(A bonus would be to select points on the > axes and enter the values to automatically do scaling.) ?To confound > the process, there is a grid on the image, and there are several lines > which may cross each other at various angles. > > My first thought is someone must have had this problem before and > solved it -- if so, can I adapt your solution? ?(There was a product > available commercially, but it didn't work worth a darn.) > > If not, can anyone suggest an approach? ?My first thought is to > set an image threshold to convert it to ones and zeros, then do some > kind of line-following algorithm that would take guidance from a > human being. ?Fortunately, the desired data form smooth curves. > It will be hard to discriminate between the line and the grid though. > > Regards, > Allen > -- > Allen Windhorn, P.E. (MN), CEng ?(507) 345-2782 > Kato Engineering > P.O. Box 8447, N. Mankato, MN ?56002 > Allen.Windhorn at emerson.com > _______________________________________________ > Image-SIG maillist ?- ?Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From Allen.Windhorn at emerson.com Tue Feb 8 15:31:55 2011 From: Allen.Windhorn at emerson.com (Allen.Windhorn at emerson.com) Date: Tue, 8 Feb 2011 08:31:55 -0600 Subject: [Image-SIG] Digitizing graphs (was Welcome...) In-Reply-To: <827dea12-fdc8-4b3d-a6a7-c4c52e784ed9@email.android.com> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> <827dea12-fdc8-4b3d-a6a7-c4c52e784ed9@email.android.com> Message-ID: <9364AF34D87CEB4C86A574178FD2A2C440215E@mkts24.na.ls.ia.priv> Chris, -----Original Message----- From: Chris Mitchell [mailto:chris.mit7 at gmail.com] > Your grid lines are in a repeating array, so first identify them. > It should be easy because they are all parallel straight lines. > Set the grid to zero to solve that problem then look for your data > lines. That sounds promising -- some kind of a spatial filter that selects repetitive features (2D wavelet transforms?). Unfortunately I'm a total newbie w.r.t. image processing, but I'll try searching for something like that. Thanks. Regards, Allen From braze at haskins.yale.edu Tue Feb 8 20:13:11 2011 From: braze at haskins.yale.edu (Dave Braze) Date: Tue, 08 Feb 2011 14:13:11 -0500 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> Message-ID: <4D5195C7.3060707@haskins.yale.edu> Maybe this will help (although I've not actually used it): http://datathief.org/ In the past I've done a similar thing using GSview and Ghostscript, which worked but was fairly tedious. -D On 2:59 PM, Allen.Windhorn at emerson.com wrote: > Greetings: > > This is a question probably more related to machine vision, but I want > to digitize a lot of hand-drawn graphs that we have accumulated over > the years. I would like to scan them, have a clerical person select a > line on the graph (maybe in several spots), and get back a set of XY > coordinates of the line. (A bonus would be to select points on the > axes and enter the values to automatically do scaling.) To confound > the process, there is a grid on the image, and there are several lines > which may cross each other at various angles. > > My first thought is someone must have had this problem before and > solved it -- if so, can I adapt your solution? (There was a product > available commercially, but it didn't work worth a darn.) > > If not, can anyone suggest an approach? My first thought is to > set an image threshold to convert it to ones and zeros, then do some > kind of line-following algorithm that would take guidance from a > human being. Fortunately, the desired data form smooth curves. > It will be hard to discriminate between the line and the grid though. > > Regards, > Allen -- Dave Braze, Ph.D. braze at haskins.yale.edu Haskins Laboratories www.haskins.yale.edu/staff/braze.html 300 George Street, STE 900 phone: 1-203-865-6163 x241 New Haven, CT 06511-6624 fax: 1-203-865-8963 From johnson at pharmacy.arizona.edu Tue Feb 8 20:44:34 2011 From: johnson at pharmacy.arizona.edu (Bruce Johnson) Date: Tue, 8 Feb 2011 12:44:34 -0700 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: <4D5195C7.3060707@haskins.yale.edu> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> <4D5195C7.3060707@haskins.yale.edu> Message-ID: I have used it, and it's a godsend for getting ancient data into useable form. On Feb 8, 2011, at 12:13 PM, Dave Braze wrote: > Maybe this will help (although I've not actually used it): http://datathief.org/ > > In the past I've done a similar thing using GSview and Ghostscript, which worked but was fairly tedious. > > -D > > On 2:59 PM, Allen.Windhorn at emerson.com wrote: >> Greetings: >> >> This is a question probably more related to machine vision, but I want >> to digitize a lot of hand-drawn graphs that we have accumulated over >> the years. I would like to scan them, have a clerical person select a >> line on the graph (maybe in several spots), and get back a set of XY >> coordinates of the line. (A bonus would be to select points on the >> axes and enter the values to automatically do scaling.) To confound >> the process, there is a grid on the image, and there are several lines >> which may cross each other at various angles. >> >> My first thought is someone must have had this problem before and >> solved it -- if so, can I adapt your solution? (There was a product >> available commercially, but it didn't work worth a darn.) >> >> If not, can anyone suggest an approach? My first thought is to >> set an image threshold to convert it to ones and zeros, then do some >> kind of line-following algorithm that would take guidance from a >> human being. Fortunately, the desired data form smooth curves. >> It will be hard to discriminate between the line and the grid though. >> >> Regards, >> Allen > > -- > > Dave Braze, Ph.D. braze at haskins.yale.edu > Haskins Laboratories www.haskins.yale.edu/staff/braze.html > 300 George Street, STE 900 phone: 1-203-865-6163 x241 > New Haven, CT 06511-6624 fax: 1-203-865-8963 > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs From Allen.Windhorn at emerson.com Wed Feb 9 18:00:28 2011 From: Allen.Windhorn at emerson.com (Allen.Windhorn at emerson.com) Date: Wed, 9 Feb 2011 11:00:28 -0600 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: <4D5195C7.3060707@haskins.yale.edu> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> <4D5195C7.3060707@haskins.yale.edu> Message-ID: <9364AF34D87CEB4C86A574178FD2A2C4402169@mkts24.na.ls.ia.priv> Dave, -----Original Message----- From: Dave Braze [mailto:braze at haskins.yale.edu] > Maybe this will help (although I've not actually used it): > http://datathief.org/ > > In the past I've done a similar thing using GSview and Ghostscript, > which worked but was fairly tedious. Thanks! That works pretty well, even for the graph with grid (with a little help from the operator). I wish it were open-source so I could tweak it (and written in Python, of course), but it will do the job. Regards, Allen From kevin.paulus at mtm.kuleuven.be Wed Feb 9 19:26:35 2011 From: kevin.paulus at mtm.kuleuven.be (Kevin Paulus) Date: Wed, 09 Feb 2011 19:26:35 +0100 Subject: [Image-SIG] Image-SIG Digest, Vol 94, Issue 2 In-Reply-To: References: Message-ID: <4D52DC5B.3020609@mtm.kuleuven.be> On 08/02/11 12:00, image-sig-request at python.org wrote: > Send Image-SIG mailing list submissions to > image-sig at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/image-sig > or, via email, send a message with subject or body 'help' to > image-sig-request at python.org > > You can reach the person managing the list at > image-sig-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Image-SIG digest..." > > > > Today's Topics: > > 1. Re: Welcome to the "Image-SIG" mailing list (Digest mode) > (Allen.Windhorn at emerson.com) > 2. Re: Welcome to the "Image-SIG" mailing list (Digest mode) > (Edward Cannon) isn't this hard AI ? From braze at haskins.yale.edu Thu Feb 10 17:12:49 2011 From: braze at haskins.yale.edu (Dave Braze) Date: Thu, 10 Feb 2011 11:12:49 -0500 Subject: [Image-SIG] Welcome to the "Image-SIG" mailing list (Digest mode) In-Reply-To: <9364AF34D87CEB4C86A574178FD2A2C4402169@mkts24.na.ls.ia.priv> References: <9364AF34D87CEB4C86A574178FD2A2C440215C@mkts24.na.ls.ia.priv> <4D5195C7.3060707@haskins.yale.edu> <9364AF34D87CEB4C86A574178FD2A2C4402169@mkts24.na.ls.ia.priv> Message-ID: <4D540E81.9060408@haskins.yale.edu> Glad it was helpful. Another search of my not terribly well organized bookmarks turned up http://digitizer.sourceforge.net/ http://plotdigitizer.sourceforge.net/ both of which seem to be opensource. -D On 2:59 PM, Allen.Windhorn at emerson.com wrote: > Dave, > > -----Original Message----- > From: Dave Braze [mailto:braze at haskins.yale.edu] > >> Maybe this will help (although I've not actually used it): >> http://datathief.org/ >> >> In the past I've done a similar thing using GSview and Ghostscript, >> which worked but was fairly tedious. > Thanks! That works pretty well, even for the graph with grid (with > a little help from the operator). I wish it were open-source so I > could tweak it (and written in Python, of course), but it will do > the job. > > Regards, > Allen > -- Dave Braze, Ph.D. braze at haskins.yale.edu Haskins Laboratories www.haskins.yale.edu/staff/braze.html 300 George Street, STE 900 phone: 1-203-865-6163 x241 New Haven, CT 06511-6624 fax: 1-203-865-8963 From craigyk at me.com Thu Feb 10 19:32:19 2011 From: craigyk at me.com (Craig Yoshioka) Date: Thu, 10 Feb 2011 10:32:19 -0800 Subject: [Image-SIG] PIL is trying to open TIFF file as FIL Message-ID: <7059CF24-A0A5-49AD-AF6D-F65674214BE2@me.com> I have a python script that uses PIL, and I've used it convert tens of thousands of images from 16-bit TIFFs to JPEGs, but recently the script gets hung up on one image, and I noticed that it is loaded using the FliImagePlugin rather than TIFF image. What gives? Can I force Image.open() to use a specific plugin? From wormingdead at gmail.com Fri Feb 11 04:57:21 2011 From: wormingdead at gmail.com (wormingdead at gmail.com) Date: Thu, 10 Feb 2011 19:57:21 -0800 Subject: [Image-SIG] BUG animated gif PIL 1.1.7 Python 2.6.5 Message-ID: I have been using PIL to convert animated gifs to images using ImageSequence and have found that one of my gifs is displaying random pixels instead of transparency in the first frame. original animated gif - made with Gimp 2.6.8 - http://tinypic.com/r/67idqw/7 first frame made with script below - http://tinypic.com/r/2uh642v/7 I discovered this using the tostring() method, though save() has the same result. I am using Ubuntu 10.4 and the Ubuntu PIL package. If you have any suggestions or information that could help, please let me know. Thanks script that saves first frame: from PIL import Image, ImageSequence gif = Image.open('loop.gif') for i, frame in enumerate(ImageSequence.Iterator(gif)): frame.save('frame %d.gif' % i) break From damonlynch at gmail.com Sat Feb 12 20:22:32 2011 From: damonlynch at gmail.com (Damon Lynch) Date: Sat, 12 Feb 2011 13:22:32 -0600 Subject: [Image-SIG] Ubuntu Natty python dumps core with PIL & sample TIF file Message-ID: This is to alert folks here to a bug I've found in Ubuntu Natty (currently alpha) with PIL. Details on how to reproduce the bug are here: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/717843 I don't know what causes the bug (libc? PIL? something else?), but I have attached to the bug report the TIF file that generates the crash. Thank you, Damon -------------- next part -------------- An HTML attachment was scrubbed... URL: From tkatchev at gmail.com Mon Feb 14 12:50:09 2011 From: tkatchev at gmail.com (Ivan Tkatchev) Date: Mon, 14 Feb 2011 14:50:09 +0300 Subject: [Image-SIG] Serious bug in PIL's handling of PNG images Message-ID: Please see the relevant discussion and patch here: http://stackoverflow.com/questions/4217869/python-pil-all-areas-of-png-with-opacity-0-have-their-opacity-set-to-1 This is a very serious bug that affects many upstream packages. It would be nice if a fix made its way into the official PIL release so that users would not have to suffer. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olt at bogosoft.com Thu Feb 17 07:56:44 2011 From: olt at bogosoft.com (Oliver Tonnhofer) Date: Thu, 17 Feb 2011 07:56:44 +0100 Subject: [Image-SIG] Serious bug in PIL's handling of PNG images In-Reply-To: References: Message-ID: <9BF3CC18-890A-471D-815B-0390ADB8E77D@bogosoft.com> Hi, On 14.02.2011, at 12:50, Ivan Tkatchev wrote: > Please see the relevant discussion and patch here: > > http://stackoverflow.com/questions/4217869/python-pil-all-areas-of-png-with-opacity-0-have-their-opacity-set-to-1 > > This is a very serious bug that affects many upstream packages. It's questionable if this is a serious bug. It's more a missing feature (read alpha from paletted images). > It would be nice if a fix made its way into the official PIL release so that users would not have to suffer. I did some contributions to improve the PNG handling and there are already in the development trunk for 1.2. You can get a source package here: https://bitbucket.org/olt/pil-2009-raclette/get/tip.tar.bz2 Regards, Oliver From gwidion at mpc.com.br Thu Feb 17 13:39:42 2011 From: gwidion at mpc.com.br (Joao S. O. Bueno) Date: Thu, 17 Feb 2011 10:39:42 -0200 Subject: [Image-SIG] Serious bug in PIL's handling of PNG images In-Reply-To: <9BF3CC18-890A-471D-815B-0390ADB8E77D@bogosoft.com> References: <9BF3CC18-890A-471D-815B-0390ADB8E77D@bogosoft.com> Message-ID: On Thu, Feb 17, 2011 at 4:56 AM, Oliver Tonnhofer wrote: > Hi, > > On 14.02.2011, at 12:50, Ivan Tkatchev wrote: >> Please see the relevant discussion and patch here: >> >> http://stackoverflow.com/questions/4217869/python-pil-all-areas-of-png-with-opacity-0-have-their-opacity-set-to-1 >> >> This is a very serious bug that affects many upstream packages. > > It's questionable if this is a serious bug. It's more a missing feature (read alpha from paletted images). Since the alpha in paletted PNG images is in the PNG specification, and PIL does support alpha I am quite certain this can be named a bug. And a severe misfeature. >> It would be nice if a fix made its way into the official PIL release so that users would not have to suffer. > > I did some contributions to improve the PNG handling and there are already in the development trunk for 1.2. You can get a source package here: https://bitbucket.org/olt/pil-2009-raclette/get/tip.tar.bz2 I appreciate your work -- congratulations for the effort. Have you addressesd this particular issue of palleted alpha support? js -><- > Regards, > Oliver > _______________________________________________ > Image-SIG maillist ?- ?Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From olt at bogosoft.com Thu Feb 17 13:53:34 2011 From: olt at bogosoft.com (Oliver Tonnhofer) Date: Thu, 17 Feb 2011 13:53:34 +0100 Subject: [Image-SIG] Serious bug in PIL's handling of PNG images In-Reply-To: References: <9BF3CC18-890A-471D-815B-0390ADB8E77D@bogosoft.com> Message-ID: <06D7D755-516D-4F6C-860F-198F591964EA@bogosoft.com> On 17.02.2011, at 13:39, Joao S. O. Bueno wrote: >> It's questionable if this is a serious bug. It's more a missing feature (read alpha from paletted images). > > Since the alpha in paletted PNG images is in the PNG specification, > and PIL does support alpha I am quite certain this can be named a > bug. And a severe misfeature. But by far not a serious one. Or how do you call bugs that crash your system then? >> I did some contributions to improve the PNG handling and there are already in the development trunk for 1.2. You can get a source package here: https://bitbucket.org/olt/pil-2009-raclette/get/tip.tar.bz2 > > I appreciate your work -- congratulations for the effort. Have you > addressesd this particular issue of palleted alpha support? Yes, it should load the alpha information for paletted images. Let me know if you have any issues with it, I would count that as a bug of my patch :) Regards, Oliver From gwidion at mpc.com.br Thu Feb 17 14:07:16 2011 From: gwidion at mpc.com.br (Joao S. O. Bueno) Date: Thu, 17 Feb 2011 11:07:16 -0200 Subject: [Image-SIG] Serious bug in PIL's handling of PNG images In-Reply-To: <06D7D755-516D-4F6C-860F-198F591964EA@bogosoft.com> References: <9BF3CC18-890A-471D-815B-0390ADB8E77D@bogosoft.com> <06D7D755-516D-4F6C-860F-198F591964EA@bogosoft.com> Message-ID: On Thu, Feb 17, 2011 at 10:53 AM, Oliver Tonnhofer wrote: > > On 17.02.2011, at 13:39, Joao S. O. Bueno wrote: >>> It's questionable if this is a serious bug. It's more a missing feature (read alpha from paletted images). >> >> Since the alpha in paletted PNG images is in the PNG specification, >> and PIL does support alpha I am quite certain this can be named a >> bug. And a severe misfeature. > > But by far not a serious one. Or how do you call bugs that crash your system then? Indeed, when reading teh subject here, I could not help thinking of a crafted PNG to run arbitrary Python code. :-) js -><- From dale at blackbagtech.com Thu Feb 24 01:56:51 2011 From: dale at blackbagtech.com (Dale Cieslak) Date: Wed, 23 Feb 2011 16:56:51 -0800 Subject: [Image-SIG] TIFF plugin issue Message-ID: <803968DA-3455-4808-92A3-E9BA8226C873@blackbagtech.com> Hi all, While trying to operate on a multi-image TIFF using PIL, on a sub-image with this identification (from ImageMagick identify): TIFF 1280x1024 1280x1024+0+0 1-bit Bilevel DirectClass 18.97MB 0.010u 0:00.000 I get an "unknown pixel mode" error. It seems that this sub-image translates to an OPEN_INFO key of: (II, 1, 1, 1, (1,1), (2,)) ...and there exists no corresponding value for such a key in the TiffImagePlugin.py module. I've found that if I add the attached patch it seems to work fine for my case. Does this look correct? If so, please add it in. Thanks in advance, Dale -------------- next part -------------- A non-text attachment was scrubbed... Name: TiffImagePlugin.py.patch.20110223.1645 Type: application/octet-stream Size: 581 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3739 bytes Desc: not available URL: From seb.haase at gmail.com Thu Feb 24 09:39:09 2011 From: seb.haase at gmail.com (Sebastian Haase) Date: Thu, 24 Feb 2011 09:39:09 +0100 Subject: [Image-SIG] TIFF plugin issue In-Reply-To: <803968DA-3455-4808-92A3-E9BA8226C873@blackbagtech.com> References: <803968DA-3455-4808-92A3-E9BA8226C873@blackbagtech.com> Message-ID: Dale, can you tell us how you generated such an image (IOW where the file came from)? Thanks, Sebastian Haase On Thu, Feb 24, 2011 at 1:56 AM, Dale Cieslak wrote: > Hi all, > > While trying to operate on a multi-image TIFF using PIL, on a sub-image with this identification (from ImageMagick identify): > > TIFF 1280x1024 1280x1024+0+0 1-bit Bilevel DirectClass 18.97MB 0.010u 0:00.000 > > I get an "unknown pixel mode" error. ?It seems that this sub-image translates to an OPEN_INFO key of: > > (II, 1, 1, 1, (1,1), (2,)) > > ...and there exists no corresponding value for such a key in the TiffImagePlugin.py module. > > I've found that if I add the attached patch it seems to work fine for my case. ?Does this look correct? ?If so, please add it in. > > Thanks in advance, > Dale > > > _______________________________________________ > Image-SIG maillist ?- ?Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > > From dale at blackbagtech.com Thu Feb 24 18:30:59 2011 From: dale at blackbagtech.com (Dale Cieslak) Date: Thu, 24 Feb 2011 09:30:59 -0800 Subject: [Image-SIG] TIFF plugin issue In-Reply-To: References: <803968DA-3455-4808-92A3-E9BA8226C873@blackbagtech.com> Message-ID: Hi Sebastian, It was a PSD file that I turned into a multi-image TIFF using ImageMagick 'convert' utility. Do you need the actual image? Thanks, Dale On Feb 24, 2011, at 12:39 AM, Sebastian Haase wrote: > Dale, > can you tell us how you generated such an image (IOW where the file came from)? > > Thanks, > Sebastian Haase > > > On Thu, Feb 24, 2011 at 1:56 AM, Dale Cieslak wrote: >> Hi all, >> >> While trying to operate on a multi-image TIFF using PIL, on a sub-image with this identification (from ImageMagick identify): >> >> TIFF 1280x1024 1280x1024+0+0 1-bit Bilevel DirectClass 18.97MB 0.010u 0:00.000 >> >> I get an "unknown pixel mode" error. It seems that this sub-image translates to an OPEN_INFO key of: >> >> (II, 1, 1, 1, (1,1), (2,)) >> >> ...and there exists no corresponding value for such a key in the TiffImagePlugin.py module. >> >> I've found that if I add the attached patch it seems to work fine for my case. Does this look correct? If so, please add it in. >> >> Thanks in advance, >> Dale >> >> >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3739 bytes Desc: not available URL: From seb.haase at gmail.com Thu Feb 24 21:23:59 2011 From: seb.haase at gmail.com (Sebastian Haase) Date: Thu, 24 Feb 2011 21:23:59 +0100 Subject: [Image-SIG] TIFF plugin issue In-Reply-To: References: <803968DA-3455-4808-92A3-E9BA8226C873@blackbagtech.com> Message-ID: On Thu, Feb 24, 2011 at 6:30 PM, Dale Cieslak wrote: > Hi Sebastian, > > It was a PSD file that I turned into a multi-image TIFF using ImageMagick 'convert' utility. ?Do you need the actual image? > No thanks, I was just curious. - Sebastian. From wrybread at gmail.com Mon Feb 28 11:52:20 2011 From: wrybread at gmail.com (Alec Bennett) Date: Mon, 28 Feb 2011 02:52:20 -0800 Subject: [Image-SIG] Creating images with layers editable by Photoshop? Message-ID: I'm trying to create a collage of a few images, and have the images appear as different layers in Photoshop. Is such a thing possible with the PIL? -------------- next part -------------- An HTML attachment was scrubbed... URL: