Re: [Image-SIG] im.show() using eog doesn't work second time

2009-06-02 Thread Fredrik Lundh
On Wed, Jun 3, 2009 at 12:28 AM, Dan Halbert halb...@halwitz.org wrote: I'm using PIL 1.1.6 on Ubuntu jaunty, and noticed a problem with invoking im.show() more than once without closing the image viewing window. On this system, im.show() uses eog to view the images. If you do something like:

Re: [Image-SIG] Will 1.1.7 be true-division safe ?

2009-05-31 Thread Fredrik Lundh
On Sat, May 30, 2009 at 10:50 AM, Sebastian Haase seb.ha...@gmail.com wrote: (Is the problem here that people think that the -Q option should be used for anything other than 3.X compatibility testing?  Writing code for 2.X that depends on -Qnew is not the right thing do to; please use the from

Re: [Image-SIG] remove an image background using PIL

2009-05-31 Thread Fredrik Lundh
On Thu, May 28, 2009 at 10:53 PM, Peter Yen colorp...@gmail.com wrote: Hi Fredrik, Thanks for your quick response. The background is unknown at the time of processing. Actually I don't need a very accurate methodology to remove all background, removing partially is good enough. imagick has

Re: [Image-SIG] Will 1.1.7 be true-division safe ?

2009-05-29 Thread Fredrik Lundh
On Fri, May 29, 2009 at 10:07 AM, Sebastian Haase seb.ha...@gmail.com wrote: I was only asking for the use of the '//' operator, which is at least backwards compatible to Python 2.2  -- I don't know the exact version when it was introduced Are you saying that 1.5.2 did not know about it

Re: [Image-SIG] Will 1.1.7 be true-division safe ?

2009-05-29 Thread Fredrik Lundh
On Sat, May 30, 2009 at 12:50 AM, Christopher Barker chris.bar...@noaa.gov wrote: True division can also be spelled float(x) / y, and that spelling works in all Python versions (and is used in plenty of places in PIL). yes, but he asking for the // operator, which I think is spelled:

Re: [Image-SIG] Will 1.1.7 be true-division safe ?

2009-05-28 Thread Fredrik Lundh
On Wed, May 27, 2009 at 11:14 AM, Fredrik Lundh fred...@pythonware.com wrote: PIL 1.1.7 works with all Python versions back to 1.5.2, so this won't ever go into the 1.1.X mainline (and division behaviour won't ever be changed in the Python 2.X series either, so it doesn't really matter

Re: [Image-SIG] Overriding 1.1.6 with 1.1.7 in local dir

2009-05-27 Thread Fredrik Lundh
On Tue, May 26, 2009 at 11:53 PM, Seph Soliman s...@konstellation.dk wrote: Would it be possible to compile and run a local version of PIL 1.1.7 with Django even if 1.1.6 is installed in site-packages in the python installation? We're running Django through Apache with mod_python currently.

Re: [Image-SIG] PIL - Opens tga as WbmpImageFile

2009-05-19 Thread Fredrik Lundh
On Tue, May 19, 2009 at 2:33 AM, Zac Burns zac...@gmail.com wrote: Please explain the case that it would be slower. I'm not sure I follow. It seems to me that the change would for many people actually make loading images faster because rather than try each accept function in succession (in

Re: [Image-SIG] PIL - Opens tga as WbmpImageFile

2009-05-19 Thread Fredrik Lundh
On Tue, May 19, 2009 at 9:52 AM, Fredrik Lundh fred...@pythonware.com wrote: Your code pulls in codecs for all programs.  That's a *lot* slower for people using only standard file formats (why do you think the init was split up in to parts in the first place?) All codecs for all programs

Re: [Image-SIG] Quantization of PNG images

2009-05-18 Thread Fredrik Lundh
On Mon, May 18, 2009 at 1:10 PM, Fredrik Lundh fred...@pythonware.com wrote: If you convert the image to mode P before you save it, you get a fixed 8-bit palette by default (based on web safe colors).  To have PIL pick an optimal palette instead, use convert(P, palette=Image.ADAPTIVE).  See

Re: [Image-SIG] Lanczos interpolation

2009-05-12 Thread Fredrik Lundh
On Sun, May 10, 2009 at 12:45 PM, David Yan davidy...@gmail.com wrote: I want to resize an image Lanczos interpolation but I haven't found any python module that can do so.  Also, I'm not knowledgeable enough to write one myself.  What's the best way I can do this?  I use PIL currently but the

Re: [Image-SIG] problem with putdata function

2009-05-12 Thread Fredrik Lundh
On Tue, May 12, 2009 at 7:11 AM, Cai Xiao(dynaturtle) dynaturtle@gmail.com wrote: Hey, I am new to PIL. And I have a problem with putdata function when I try to load some data to the image object The code is as following:     mode = 'RGB'     size = (sregion.right - sregion.left,

Re: [Image-SIG] PIL - Tiff problems

2009-05-04 Thread Fredrik Lundh
On Mon, May 4, 2009 at 4:08 PM, Andrew aga...@genome.med.harvard.edu wrote: I've been having a problem with my tiff. When converting to a PNG or a JPEG the colors get messed up (black becomes white). I belive it has todo with the tiff being little endian. I noticed that in 1.1.7 the following

Re: [Image-SIG] Removing specific range of colors from scanned image

2009-04-28 Thread Fredrik Lundh
On Tue, Apr 28, 2009 at 4:13 PM, Eduardo Ismael ei...@hotmail.com wrote: Thanks, John - I'll have a look at numpy and vips (and CIELAB) right away. I'm having trouble thinking out of the for pixel in image loop. Is it possible to calculate with images and not pixels with PIL? Sure - the trick

Re: [Image-SIG] using getcolors( ) properly

2009-04-27 Thread Fredrik Lundh
On Sat, Apr 25, 2009 at 3:00 PM, Eduardo Ismael ei...@hotmail.com wrote: I had no success using im.getcolors(). I now there is something you have to do to avoid getting None as a result, but I could not understand the following from the manual: To make sure you get all colors in an image,

Re: [Image-SIG] Remove Noise from a National Weather Service Radar Image (.gif)

2009-04-27 Thread Fredrik Lundh
On Sat, Apr 25, 2009 at 12:45 AM, J.D. Main jdm...@comcast.net wrote: Hi Fredrik, You're right about GIF being dead but that's what the Weather Service uses. GIF image transparency always works though and that's what I need for this application.  I'm placing the Radar images over the top of

Re: [Image-SIG] grayscale image: find darkest pixel and delete lighter ones

2009-04-23 Thread Fredrik Lundh
On Thu, Apr 23, 2009 at 12:58 AM, Eduardo Ismael ei...@hotmail.com wrote: Hi! I wonder if it is possible to do something like the following with the Python Imaging library: for pixel in image:     get how close to black it is register what would be the darkest shade found in the image

Re: [Image-SIG] EXIF tag reading fails for minimal tagged images

2009-04-18 Thread Fredrik Lundh
On Sat, Apr 18, 2009 at 2:41 PM, Kurt Schwehr schw...@ccom.unh.edu wrote: This is with python 2.6, pil 1.1.6 on mac osx 10.5.6 with fink python/pil wget http://schwehr.org/blog/attachments/2009-04/20090201-1601-with-exif-gps.jpeg ipython import Image im =

Re: [Image-SIG] Remove Noise from a National Weather Service Radar Image (.gif)

2009-04-18 Thread Fredrik Lundh
On Sat, Apr 18, 2009 at 4:54 PM, J.D. Main jdm...@comcast.net wrote: Here's a URL explaining all this:  http://radar.weather.gov/GIS.html In short these images are GIF files with a 256 color pallete.  The interesting pixels in these images are red, green, yellow and blue. The pixels

Re: [Image-SIG] ANN: PIL 1.1.7 beta 1 (April 12, 2009)

2009-04-14 Thread Fredrik Lundh
On Mon, Apr 13, 2009 at 10:59 PM, Fredrik Lundh fred...@pythonware.com wrote: PIL 1.1.7 beta 1 for Python 2.X is now available.  Source code can be downloaded from the Mercurial main repository:   http://hg.effbot.org/pil-2009-raclette/src/pil-117b1-20090412 A tarball and a SVN vendor drop

Re: [Image-SIG] proper type of image objects

2009-04-13 Thread Fredrik Lundh
On Mon, Apr 13, 2009 at 5:01 AM, Guy K. Kloss g.kl...@massey.ac.nz wrote: Hi, I'm currently working on extending the ctypes based LCMS bindings, and I want to support PIL image types natively inside the doTransform() method on a Transform object. Anyway, for that task I need to distinguish

[Image-SIG] ANN: PIL 1.1.7 beta 1 (April 12, 2009)

2009-04-13 Thread Fredrik Lundh
PIL 1.1.7 beta 1 for Python 2.X is now available. Source code can be downloaded from the Mercurial main repository: http://hg.effbot.org/pil-2009-raclette/src/pil-117b1-20090412 If you're using Mercurial, you can use hg clone to download a copy: hg clone -r pil-117b1-20090412

Re: [Image-SIG] ANN: PIL 1.1.7 beta 1 (April 12, 2009)

2009-04-13 Thread Fredrik Lundh
On Mon, Apr 13, 2009 at 10:55 PM, Fredrik Lundh fred...@pythonware.com wrote: PIL 1.1.7 beta 1 for Python 2.X is now available.  Source code can be downloaded from the Mercurial main repository:   http://hg.effbot.org/pil-2009-raclette/src/pil-117b1-20090412 Just noticed that Bitbucket has

Re: [Image-SIG] Creating a Transparent Image and Placing it Over Another Image (txt)

2009-04-08 Thread Fredrik Lundh
On Wed, Apr 8, 2009 at 5:55 PM, Edward Cannon cannon...@gmail.com wrote: Add the line from Tkinter import Lost an asterisk there, I think: from Tkinter import * /F On Apr 7, 2009, at 10:21 PM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: This looks good, but there's a slight

Re: [Image-SIG] Creating a Transparent Image and Placing it Over Another Image (txt)

2009-04-08 Thread Fredrik Lundh
\Development_Sentuser-Utilities\Playground\fun-move_object.py, line 33, in Demo   img=Image.open('jupa9810.jpg')  # some image you have. AttributeError: class Image has no attribute 'open' Fredrik Lundh wrote: On Wed, Apr 8, 2009 at 5:55 PM, Edward Cannon cannon...@gmail.com wrote: Add the line

Re: [Image-SIG] Raster Calculation: Script Error

2009-04-03 Thread Fredrik Lundh
On Fri, Apr 3, 2009 at 4:59 AM, santosh panda santosh...@yahoo.co.in wrote: I am using Landsat single band image as input and I want to apply the equation shown below in the script and write the output to a new raster file. 1. The below pasted script works fine without 'cos' term but it

Re: [Image-SIG] PIL Handbooks

2009-04-03 Thread Fredrik Lundh
On Thu, Apr 2, 2009 at 9:23 PM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: I'm very new to PIL, and don't see any handbooks for 1.1.6 or the forthcoming 1.1.7. In fact, this looks like the extent of them: Python Imaging Library Handbook for 1.1.5 (online) Python Imaging Library Handbook

Re: [Image-SIG] Default Structure of a 640x480 PIL BMP File?

2009-04-03 Thread Fredrik Lundh
On Fri, Apr 3, 2009 at 10:38 PM, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: The only PIL document that I have available is the PIL-handbook-2.pdf, which describes 1.1.3. I can find nothing in it about the module you mention. I have some scattered PIL material, but it is of no help here.

Re: [Image-SIG] ANN: PIL 1.1.7 alpha 2 (March 28, 2009)

2009-04-02 Thread Fredrik Lundh
On Sat, Mar 28, 2009 at 6:36 PM, Fredrik Lundh fred...@pythonware.com wrote: Windows binaries for Python 2.4, 2.5, and 2.6 can be found here:    http://effbot.org/downloads/#pil A binary for the python.org version of Python 2.5 for Mac OS X is now available, thanks to Chris Barker. It should

Re: [Image-SIG] Bug in Image.rotate method and documentation

2009-04-02 Thread Fredrik Lundh
On Thu, Apr 2, 2009 at 10:55 PM, Todd Reed t...@toddreed.name wrote: I am using PIL 1.1.6, and found a trivial-to-fix bug in the Image.rotate method: This is fixed in 1.1.7. As for filter vs. resample, it's a positional argument, not a keyword argument. /F

Re: [Image-SIG] Bug in Image.rotate method and documentation

2009-04-02 Thread Fredrik Lundh
On Fri, Apr 3, 2009 at 12:54 AM, Fredrik Lundh fred...@pythonware.com wrote: This is fixed in 1.1.7. The relevant changeset is here, btw: http://hg.effbot.org/pil-2009-raclette/changeset/db1b40ca85c4/ /F ___ Image-SIG maillist - Image-SIG

[Image-SIG] ANN: PIL 1.1.7 alpha 2 (March 28, 2009)

2009-03-28 Thread Fredrik Lundh
PIL 1.1.7 alpha 2 for Python 2.X is now available. Source code can be downloaded using Subversion or Mercurial: http://svn.effbot.org/public/tags/pil-1.1.7a2-20090328/ http://hg.effbot.org/pil-2009-raclette/src/pil-117a2-20090328/ Windows binaries for Python 2.4, 2.5, and 2.6 can be

Re: [Image-SIG] ANN: PIL 1.1.7 alpha 2 (March 28, 2009)

2009-03-28 Thread Fredrik Lundh
On Sat, Mar 28, 2009 at 2:42 PM, Fredrik Lundh fred...@pythonware.com wrote: PIL 1.1.7 alpha 2 for Python 2.X is now available.  Source code can be downloaded using Subversion or Mercurial:    http://svn.effbot.org/public/tags/pil-1.1.7a2-20090328/    http://hg.effbot.org/pil-2009-raclette

Re: [Image-SIG] PIL for Python3

2009-03-28 Thread Fredrik Lundh
Checking recent posts can sometimes be helpful: http://mail.python.org/pipermail/image-sig/2009-March/005498.html /F 2009/3/28 joe oettinger joeoettin...@gmail.com: Sure could use PIL for Python3. Anybody know if/when it'll be done? I imagine there are a few other programmers interested.

Re: [Image-SIG] PIL with JPEG support on Windows: Error Writing JPEG file

2009-03-25 Thread Fredrik Lundh
2009/3/25 Bryan Jeal br...@hideawaystudios.com: Here is an update: 1. I removed Python and PIL from the system and reinstalled them (for PIL I used PIL-1.1.6.win32-py2.5.exe); however, it isn't working correctly... I'm not sure why you think you need to open the output file yourself, but if

Re: [Image-SIG] PIL with JPEG support on Windows: Error Writing JPEG file

2009-03-25 Thread Fredrik Lundh
On Wed, Mar 25, 2009 at 5:34 PM, Bryan Jeal br...@hideawaystudios.com wrote: I would like to thank everyone for their help - you all are amazing! It was a problem with not opening a file in binary mode - which as soon as I read that I smacked my head very hard and had a Homer moment. I hope

Re: [Image-SIG] PIL with JPEG support on Windows: Error Writing JPEG file

2009-03-24 Thread Fredrik Lundh
Footnote: I'm pretty sure that the main reason for the renaming was that we ended up with things like a binding called zlib.dll to a low-level library named zlib.dll. See e.g. this excerpt from a ten-year old copy of PC/readme.txt that I had lying around: /.../ The output file should be called

Re: [Image-SIG] [raclette] that JPEG CMYK thing, again

2009-03-24 Thread Fredrik Lundh
On Tue, Mar 24, 2009 at 9:54 AM, Michael van Tellingen michaelvantellin...@gmail.com wrote: I've just tested my application with the PIL 1.1.7 tip and latest alpha and still have problems with the conversion from CMYK jpeg to RGB. The test images mailed earlier on this mailinglist (black

[Image-SIG] ANN: PIL 1.1.7 alpha 1 (March 17, 2009)

2009-03-17 Thread Fredrik Lundh
The first official alpha of PIL 1.1.7 is now available; you can get source archives from http://bitbucket.org/effbot/pil-2009-raclette/src/pil-117-20090317 (use the download menu in the right corner). Alternatively, you can check out the alpha using Mercurial: $ hg clone -r

Re: [Image-SIG] Converting images to palette mode

2009-03-16 Thread Fredrik Lundh
Official for the 1.1.7 release, at least. Not sure what we'll do beyond that (and whatever we do, the finished release will be available from svn.effbot.org for svn:externals users, as usual). /F On Sat, Mar 14, 2009 at 11:10 AM, Evgeny Salmin evg.sal...@gmail.com wrote: Hello Fredrik. Yes,

Re: [Image-SIG] ImageMath power-function error

2009-03-16 Thread Fredrik Lundh
No time to double-check, but I suspect the 1.1.6 version doesn't support ** - it's mentioned in the documentation, but I don't see any sign of it in the source code. It's on my list of things to fix for 1.1.7. /F 2009/3/15 Mark Wendell mark.wend...@gmail.com: Hey all, I can't seem to use the

Re: [Image-SIG] Strange Truetype ImageFont rendering behavior

2009-03-13 Thread Fredrik Lundh
Seems to work for me (see attachment). However, I just realized that I have a rather old version of Freetype on this machine (2.1.10). What version are you using? /F 2009/3/12 Oliver Weichhold oli...@weichhold.com: The code snippet below produces the following two result images on my system:

Re: [Image-SIG] Converting images to palette mode

2009-03-13 Thread Fredrik Lundh
It's the same fix as this one, right? http://bitbucket.org/effbot/pil-2009-raclette/changeset/577ae0c2a85e/ I haven't been able to force the leak during testing (the loop can terminate in several ways, and only one of them leaks memory; none of my test images seemed to trigger this behaviour

[Image-SIG] [raclette] 1.1.7 status

2009-03-13 Thread Fredrik Lundh
It's the same fix as this one, right? By the way, here's a rough version history for the current 1.1.7 snapshot available from here: http://bitbucket.org/effbot/pil-2009-raclette/src/874f7005c34c/ Let me know if I've missed some patch that absolutely should go into 1.1.7, or some bug that

[Image-SIG] [raclette] PyCMS now part of PIL

2009-03-09 Thread Fredrik Lundh
Kevin Cazabon has graciously donated his PyCMS library to PIL, and it landed in the raclette tree yesterday. The library will automatically be built if you have LittleCMS on the machine (www.littlecms.com). The Python binding is now in PIL.ImageCms. I'm still working on a tighter integration,

Re: [Image-SIG] OverflowError on image save

2009-03-06 Thread Fredrik Lundh
), 54, ('BGR', 872, -1))] and the second image: i=PIL.Image.open(open(/Users/wichert/Desktop/dont2.bmp)) i.mode 'RGB' i.size (288, 4294967078L) i.tile [('raw', (0, 0, 288, 4294967078L), 54, ('BGR', 864, -1))] Regards, Wichert. On 3/5/09 6:41 PM, Fredrik Lundh wrote: Can you

[Image-SIG] towards 1.1.7 (code name raclette)

2009-03-06 Thread Fredrik Lundh
Looks like some people out there have noticed this little page: http://bitbucket.org/effbot/pil-2009-raclette/overview/ so I might as well announce it to the list - it's finally time for the 1.1.7 patch catchup I mentioned last year. The plan is simple: pick

Re: [Image-SIG] towards 1.1.7 (code name raclette)

2009-03-06 Thread Fredrik Lundh
so I might as well announce it to the list - it's finally time for the 1.1.7 patch catchup I mentioned last year. (and many thanks to Tim Hatch who happened to nag me about this at a point where I had some cycles to spare and happened to be tinkering with Mercurial for another reason) /F

Re: [Image-SIG] OverflowError on image save

2009-03-06 Thread Fredrik Lundh
Ok, a patch for this issue can be found here: http://bitbucket.org/effbot/pil-2009-raclette/changeset/53b7aa435b9c/ (you can also grab the updated files via that page) Thanks to Wichert, who reported the problem and provided overflowing samples. /F On Fri, Mar 6, 2009 at 5:43 PM, Fredrik

[Image-SIG] [raclette] help wanted - anyone has a recent photoshop within reach and a few minutes to spare?

2009-03-06 Thread Fredrik Lundh
I'm have a lingering feeling that someone have helped me with this before, but I cannot find the mails/files, so here we go again: I need a small (e.g. 100x100) sample CMYK JPEG from Photoshop - that is, the kind of file that keeps causing trouble for people on this list from time to time. To

Re: [Image-SIG] PIL and embedded ICC profiles

2009-03-06 Thread Fredrik Lundh
Except for the JPEG hack, Florian's original patch looks pretty quite clean to me. And I'm pretty sure I can do something about the hack before we go alpha. That diff link looks a bit strange to me, though - looks more like status output than diff output. Am I missing something, or did you post

Re: [Image-SIG] [raclette] help wanted - anyone has a recent photoshop within reach and a few minutes to spare?

2009-03-06 Thread Fredrik Lundh
Problem solved! Roughly half of the display tools I have on my machine displays it as blue on gray, and the rest as red on black. This is going to be rather interesting ;-) /F On Fri, Mar 6, 2009 at 9:49 PM, Fredrik Lundh fred...@pythonware.com wrote: I'm have a lingering feeling that someone

Re: [Image-SIG] PIL and embedded ICC profiles

2009-03-06 Thread Fredrik Lundh
Thanks! http://bitbucket.org/effbot/pil-2009-raclette/changeset/debdde9b7862/ /F On Fri, Mar 6, 2009 at 10:25 PM, Tim Hatch t...@timhatch.com wrote: Except for the JPEG hack, Florian's original patch looks pretty quite clean to me. Right, I just fixed where hunks didn't apply and adjusted

[Image-SIG] [raclette] that JPEG CMYK thing, again

2009-03-06 Thread Fredrik Lundh
Thanks to Tim and Charlie, I now have a set of nice Photoshop CMYK samples to play with. The first result is a revamp of Kevin's CMYK patch; I'm now doing the inversion at the codec levels, both when reading and writing. Also, the code *always* assumes Adobe behaviour, in both directions. The

Re: [Image-SIG] OverflowError on image save

2009-03-05 Thread Fredrik Lundh
Can you print the following attributes for a broken file, before calling load: pil_data.mode pil_data.size pil_data.tile /F 2009/3/3 Wichert Akkerman wich...@simplon.biz: I have a small routine which tries to verify if an uploaded file is a valid image. It works like this:

Re: [Image-SIG] ZLIB (PNG/ZIP) support not available

2009-03-05 Thread Fredrik Lundh
I'm not up to date with RHEL packaging, but judging from e.g. http://rpm.pbone.net/index.php3/stat/4/idpl/5602905/com/zlib-1.2.1.2-1.2.x86_64.rpm.html the packages you have are runtime libraries, not development packages (i.e. header files and link libraries are missing). Look for packages

Re: [Image-SIG] PIL 1.1.6, python 64bit on Windows XP x64

2009-03-05 Thread Fredrik Lundh
Thanks for the howto. Now I just need to go find myself a 64-bit box to play with ;-) As for the file descriptor crashes, things like that is usually caused by a mismatch between the C runtime libraries used for core Python and the extension (the file handle is allocated by the Python main

Re: [Image-SIG] problem in installing pil

2009-02-26 Thread Fredrik Lundh
Ah, the beauty of partial localization (but google do have a few posts that explain how to fix this also for the german error message, so that's no excuse for not googling before posting ;-). Anyway, as others have pointed out (and I'm pretty sure it's mentioned in the build docs too), you need

Re: [Image-SIG] installing PIL from source kit for Python 2.6.1

2009-01-31 Thread Fredrik Lundh
I suspect he's referring to the distutils installer (which is a part of standard Python), not the signing procedure. (the installer is signed, iirc). /F On Sat, Jan 31, 2009 at 1:17 AM, Christopher Barker chris.bar...@noaa.gov wrote: Andrew MacGinitie wrote: another question: why does the

Re: [Image-SIG] installing PIL from source kit for Python 2.6.1

2009-01-31 Thread Fredrik Lundh
On Sat, Jan 31, 2009 at 12:51 AM, Andrew MacGinitie macgini...@charter.net wrote: ...can it be done? There's an installer for Python 2.6 available from here: http://effbot.org/downloads/#pil which seem to indicate that it can be done. If you insist on building it yourself, see the Build

Re: [Image-SIG] installation error of PIL1.1.6

2009-01-31 Thread Fredrik Lundh
You're missing the Tcl/Tk developer files; see e.g. http://mail.python.org/pipermail/image-sig/2008-December/005308.html This probably means that you have enough of Tcl/Tk installed for the installation process to think it's worth building the Tkinter support, but, as Karsten points out,

Re: [Image-SIG] Converting images to palette mode

2009-01-29 Thread Fredrik Lundh
I am posting from another e-mail (luko...@gmail.com). Posting from my main address (lukas.or...@infinit.sk), powered by Google Apps for Business, still returns the notification about suspicious header. The same to my colleague @infinit.sk. Could the admin chech it please ? Looks like the

Re: [Image-SIG] Converting images to palette mode

2009-01-27 Thread Fredrik Lundh
Does it always stop at the same image, or after roughly the same number of images? Have you checked for memory/cpu consumption during the conversion (in case it's a leak). /F 2009/1/26 Lukas Orsin lukas.or...@infinit.sk: Hi, We are converting much images (296,000 tiles) at size 256x256px from

Re: [Image-SIG] PIL bug report: touble in save jpeg file with quality=100 and optimize=True

2009-01-25 Thread Fredrik Lundh
It's a limitation in the libjpeg library that PIL doesn't work around; the approach described here should still work: http://mail.python.org/pipermail/image-sig/1999-August/000816.html /F 2009/1/24 Daniil Osokin odan...@gmail.com: Hello I have try to save jpeg file with quality=100 and

Re: [Image-SIG] 16bit TIFF files: error in Image.putpixel()

2009-01-23 Thread Fredrik Lundh
What's the mode for this image? If it says I;16 or something similar, it's not fully supported in 1.1.6, and you may have to explicitly convert it to mode I to work with it. (there should be an option to open() so you can explicitly tell PIL if you're prepared to work with experimental modes,

Re: [Image-SIG] malloc error

2009-01-05 Thread Fredrik Lundh
What version of aggdraw are you using? The Draw(im) form is buggy in some versions; it doesn't release the im object when the draw object goes away. Here's a workaround (cut and pasted from an old message to this list): as a workaround, you can use the original constructor syntax instead,

Re: [Image-SIG] Python version 1.2+

2008-12-17 Thread Fredrik Lundh
Those were special editions that were only available as part of a commercial package (imToolkit). That branch was discontinued long ago. The next *major* update of PIL will most likely be called 2.0. /F 2008/12/17 Luke Walker lwal...@monetate.com On this page:

Re: [Image-SIG] Addition to PIL FAQ

2008-12-15 Thread Fredrik Lundh
That specific case is discussed in the last section of that page. The page is roughly sorted after how common the different cases were when the page was first written; given that different people get stuck at different points in the process, I'm not sure it's possible to have everyone's stumbling

Re: [Image-SIG] ImageDraw leaks unless deleted?

2008-12-09 Thread Fredrik Lundh
If explicit del appears to address a leak that Python's builtin refcounter doesn't handle, that's more of a bug in Python than in PIL ;-) I'm not 100% sure, but I think the rationale for including the explicit del in that example is that the draw object holds a reference to the image you're

Re: [Image-SIG] Problem with show() in PIL1.1.6

2008-12-09 Thread Fredrik Lundh
The 1.1.5 behaviour on Windows was broken in a number of ways, so the code was reverted to the 1.1.4 state of things in 1.1.6. To get the old behaviour, you can use the helper function shown in this session: import threading from PIL import ImageWin def display(im): ... def viewer(): ...

Re: [Image-SIG] Creating an image from canvas's getImageData() data

2008-12-09 Thread Fredrik Lundh
The raw data decoder expects raw binary bytes; in this case, it expects four bytes per pixel (red green blue alpha), repeated 80x80 times to fill the entire image. What does the data you get back from getImageData() look like if you print (a portion of) it? e.g. say print repr(data[:40])

Re: [Image-SIG] Creating an image from canvas's getImageData() data

2008-12-09 Thread Fredrik Lundh
On Tue, Dec 9, 2008 at 5:35 PM, Fredrik Lundh [EMAIL PROTECTED] wrote: The raw data decoder expects raw binary bytes; in this case, it expects four bytes per pixel (red green blue alpha), repeated 80x80 times to fill the entire image. What does the data you get back from getImageData() look

Re: [Image-SIG] PIL license question

2008-11-13 Thread Fredrik Lundh
Tomasz Zieliński wrote: Also, I noticed that apt-getted PIL package on Ubuntu doesn't include PIL license text (at least I couldn't find it). Should I put one somewhere around? for the record, we've diskussed this off-list, and the relevant license text is installed under:

Re: [Image-SIG] Bug in ImageWin (display.c)

2008-11-13 Thread Fredrik Lundh
Noboru Uchida wrote: Problem: Dib.draw() fails occasionally and raises Overflow Error. Reason: In display.c, Window Handles(HWND) and Device Contexts(HDC) are both declared as int. HWND/HDC arguments are parsed by PyArg_ParseTuple(), using format i. i converts Python integer to plain C

Re: [Image-SIG] antialiased lines and polygons

2008-11-12 Thread Fredrik Lundh
Laura Edward Cannon wrote: A quick question, is their a way to get an antialiased line or polygon in PIL? I draw my shapes just fine, but the edges are jagged. Some packages I know can antialias to reduce the appearance of pixelization, is PIL one of those? there's no built-in support for

Re: [Image-SIG] combine jpeg's

2008-11-12 Thread Fredrik Lundh
Nils Wagner wrote: Is it possible to combine 4 jpegs into 1 jpeg ? A small example would be appreciated. The correct way to do this depends on your definition of combine, of course, but assuming that you have four smaller JPEG files, all having the same size, you can simply do: im1 =

Re: [Image-SIG] No transparency key in info for transparent PNG

2008-10-02 Thread Fredrik Lundh
Szymon Kosok wrote: I have transparent PNG (when I open it in Photoshop it's transparent) and when I try to open it with PIL there is no transparency key in info. I've tried another transparent PNG (famfamfam icon) and no luck with that too. What can cause that problem? Mode is RGBA. the

Re: [Image-SIG] Aggdraw: curveto()

2008-09-24 Thread Fredrik Lundh
Yanone wrote: it seems that this is a known problem: the curveto() function of aggdraw draws straight lines instead of curves, ignoring the given bezier control points. the last post i found about this dates back to march 2006, and even the developer version of aggdraw via svn didn't change

[Image-SIG] pil sightings

2008-09-12 Thread Fredrik Lundh
this definitely made my day: http://vanrees.org/weblog/archive/2008/09/12/python-calculated-coin excellent work, stani. and congrats for winning! (just wish I could figure out how to order one from here ;-) /F ___ Image-SIG maillist -

Re: [Image-SIG] Image.open problem

2008-09-08 Thread Fredrik Lundh
Janwillem van Dijk wrote: It all worked nicely but after a re-install of my systems (linux pc, linux laptop, windows pc) I have a problem with Image.open(fname). Under linux (python2.5 ubuntu 8.04) I get: Traceback (most recent call last): File

Re: [Image-SIG] Image paste method resulting in garbage pixels in images

2008-09-07 Thread Fredrik Lundh
David Gobaud wrote: We are using PIL to render images. When we use the Image paste method to blend 2 RGBA image we end up with garbage pixels in the output as shown below. How can we fix this? can you send me the two image layers used to create that image? (or post them somewhere and mail

Re: [Image-SIG] Announcing my PIL repository

2008-09-07 Thread Fredrik Lundh
Alexey Borzenkov wrote: P.P.S. And I hope that PIL is not dead and we will see some releases in the future. http://mail.python.org/pipermail/image-sig/2008-July/005101.html /F ___ Image-SIG maillist - Image-SIG@python.org

Re: [Image-SIG] is this a bug?

2008-09-06 Thread Fredrik Lundh
Gareth wrote: I believe I have found a bug with PIL. It can be illustrated by the following code: from PIL import Image, ImageFile path = path to a valid png file file = open(path, 'rb') p = ImageFile.Parser() p.feed(file.read()) img = p.close() file.close() img.thumbnail((380, 380),

Re: [Image-SIG] Bug in rotate with expand=True

2008-09-01 Thread Fredrik Lundh
Ole Laursen wrote: I hate to quote myself, but I just realized that I had to apply this patch again against a new server install. Did somebody look at my bug report from back in April? there hasn't been a new release since april, but it's fixed in the trunk, and you're credited in the

Re: [Image-SIG] Generate .tif stack

2008-08-30 Thread Fredrik Lundh
assa sittner wrote: I would like to generate a series of synthetic images, and then wrap them all up into a single-file .tif stack (like in metamorph or ImageJ). how can i do that in python? you can use PIL to create the individual frames, but PIL doesn't contain any ready-made API for

Re: [Image-SIG] Converting 32Bit png to 8Bit png

2008-08-27 Thread Fredrik Lundh
[EMAIL PROTECTED] skrev: I do exactly need 2 ways of processing: a) Convert the 32Bit RGBA png to a 8Bit RGB palette png how do you want to treat the alpha layer when doing this? a) Convert the 32Bit RGBA png to a 8Bit RGBA palette png same here. (PIL's standard conversion just drops

Re: [Image-SIG] VUV color space conversions??

2008-08-26 Thread Fredrik Lundh
Ashish Sethi wrote: I am back with a new doubt (all be it in the same color space spectrum) MY doubts are regarding YUV color spectrum:- (I suspect you mean question here, not doubt; the latter usually implies disagreement. see http://www.perlmonks.org/?node_id=444996 ) 1. How r yuv

Re: [Image-SIG] PIL - 1.1.6, Centroid

2008-08-25 Thread Fredrik Lundh
Ashish Asgekar wrote: I was looking for Centroid function in Python and downloaded PIL-1.1.6. I learnt that Centroid function is available as Crack Code. However, when I search for CrackCode, I find it is not available anymore from PythonWare. 1) Is CrackCode available in

Re: [Image-SIG] problem in converting pixel data to image file

2008-08-20 Thread Fredrik Lundh
Ashish Sethi wrote: But the thing is I was under the impression that in a ppm image the maximum or the min color value that any of the R,G and B components can take...i.e. if instead of 255 in the file below, if I give 16 then automatically it would imply my color space has changed to RGB 4:4:4

Re: [Image-SIG] Python Imaging Library (PIL)

2008-08-20 Thread Fredrik Lundh
Ang Ah Giat, Linda wrote: I try to install plone into my zope, it complaint that PortalTransforms Problem importing module image_to_png : No module named PIL.Image. So I download the _*Python Imaging Library 1.1.6 Source Kit*_ http://effbot.org/downloads/Imaging-1.1.6.tar.gz (all platforms)

Re: [Image-SIG] problem in converting pixel data to image file

2008-08-20 Thread Fredrik Lundh
Ashish Sethi wrote: IF there is a file in ppm format like P3 3 3 15 0 0 0 10 10 10 2 2 2 1 1 1 12 12 12 4 4 4 4 4 4 11 11 11 9 9 9 Then isnt this file in RGB 4:4:4 color space as the maximum value that any of the color components can take is 15 (binary 4 bit) Given that it uses 2-3

[Image-SIG] PIL on Mac OS X 10.5

2008-08-19 Thread Fredrik Lundh
just for the archives: Matt Kangas recently posted a workaround showing how to use the pythonmac.org PIL build with the original OS X Python: http://www.p16blog.com/p16/2008/05/appengine-installing-pil-on-os-x-1053.html (not a mac user myself, so I cannot verify that this works. comments and

Re: [Image-SIG] Writting ppm files??

2008-08-19 Thread Fredrik Lundh
Fredrik Lundh wrote: looks like you could save yourself a lot of time and effort by first checking if you can install: http://www.pythonware.com/products/pil/ sorry, thought you'd posted this to c.l.python, and didn't see the import statement at first. I am working with PPM/PGM/PBM file

Re: [Image-SIG] Fwd: problem in converting pixel data to image file

2008-08-18 Thread Fredrik Lundh
Ashish Sethi wrote: I have a problem in converting the pixel data (read from a string and written to a file using fromstring command in PIL ). The file handle of this file is called buffer. Now, when I tried to open the file as an image file but it didnt work. Then I read the documentation of

Re: [Image-SIG] PNG transparency not recognized

2008-08-13 Thread Fredrik Lundh
Sebastian Spaeth wrote: extensive googling didn't help, so here I go. I produce PNG files with lot's of transparency. These are run through various PNG optimizers (pngnq, pngcrush). When I try to open them, they are im.mode='RGB', ie all the transparency is gone. This is the same in PIL

Re: [Image-SIG] Image to Matrix to Image.

2008-08-13 Thread Fredrik Lundh
Talat Fakhri wrote: Thanks. This is what I was looking for. So , after changing the pixel [0,0], how do we save the modified image? the same way as you'd save any PIL image: http://effbot.org/tag/PIL.Image.Image.save you have read the tutorial, right?

Re: [Image-SIG] how to use pil for a jpeg 90 compression?

2008-08-12 Thread Fredrik Lundh
Karsten Hiddemann skrev: I have 30 picture, and I wanna use PIL to compress them to jpeg 90. Is there a function that can do that in PIL? What does 30 and 90 refer to? I'd think that he refers to the Quality or Compression Level as most image manipulation programs call it. Yeah, but

Re: [Image-SIG] Multi-threading and PIL

2008-08-11 Thread Fredrik Lundh
Kevin Cazabon wrote: A couple years ago I did some work on enabling multi-threading in the PIL core library, with the help of Fredrik and others. We successfully implemented it by releasing the GIL prior to starting many of the larger routines/functions in the C library, and re-acquiring it

Re: [Image-SIG] Image to Matrix to Image.

2008-08-11 Thread Fredrik Lundh
Talat Fakhri wrote: I am a newbie here. I would like to know if there is any function which converts Images to Matrix(RGB or greyscale etc) and another function which converts the matrix into Image file? matrix as in? If you just want to work with the image data as Python sequence, use

Re: [Image-SIG] how to use pil for a jpeg 90 compression?

2008-08-11 Thread Fredrik Lundh
zhang chi wrote: I have 30 picture, and I wanna use PIL to compress them to jpeg 90. Is there a function that can do that in PIL? What does 30 and 90 refer to? /F ___ Image-SIG maillist - Image-SIG@python.org

<    1   2   3   4   5   >