Re: Need help from someone that have PIL installed

2010-08-06 Thread Peter Otten
alejandro wrote: Can please someone run this little script that should output characters like � in an image. If it does it correctly can you tell me what OS, python version PIL version you have? Or better if someone can tell me why this is not working properly on my PC? (Win XP, PIL

Re: Need help from someone that have PIL installed

2010-08-06 Thread alejandro
# the last tuple is the background color img = Image.new(RGBA,(300, 50), (0, 0, 0, 0)) Thank you for this # I think that the PIL can cope with unicode, so add a u-prefix here: text = uproba test ¾æèð¹ draw.text((20,8), text ,font=arial, fill=red) Nope i gives: SyntaxError: (unicode

Re: Need help from someone that have PIL installed

2010-08-06 Thread Peter Otten
alejandro wrote: # the last tuple is the background color img = Image.new(RGBA,(300, 50), (0, 0, 0, 0)) Thank you for this # I think that the PIL can cope with unicode, so add a u-prefix here: text = uproba test � draw.text((20,8), text ,font=arial, fill=red) Nope i gives

Re: Need help from someone that have PIL installed

2010-08-06 Thread alejandro
Make sure that # encoding:utf-8 is the first line of your script, details and fineprint here: http://www.python.org/dev/peps/pep-0263/ Peter Tryed that... What was the output of my script on your computer? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help from someone that have PIL installed

2010-08-06 Thread Peter Otten
Image; print Image.VERSION 1.1.6 $ cat draw_text.py # encoding:utf-8 from PIL import Image import ImageDraw import ImageFont img = Image.new(RGBA,(300, 50), (0, 0, 0, 0)) draw = ImageDraw.Draw(img) FONT = /usr/share/fonts/truetype/msttcorefonts/arial.ttf arial = ImageFont.truetype(FONT, 32

Re: Need help from someone that have PIL installed

2010-08-06 Thread Thomas Jollans
On 08/06/2010 04:37 PM, alejandro wrote: # the last tuple is the background color img = Image.new(RGBA,(300, 50), (0, 0, 0, 0)) Thank you for this # I think that the PIL can cope with unicode, so add a u-prefix here: text = uproba test ¾æèð¹ draw.text((20,8), text ,font=arial, fill

PIL

2010-08-03 Thread Navid Parvini
Dear All, I want to convert a .png file to .xpm using PIL. I used the following command: Image.open( t1.png).save(a1.xpm). But it doesn't work and I could not convert it. Would you please help me and let me know that how can I convert/save .xpm files in PIL. Thank you in advance. Thanks

Re: PIL

2010-08-03 Thread James Mills
On Tue, Aug 3, 2010 at 6:45 PM, Navid Parvini parvini_na...@yahoo.comwrote: I want to convert a .png file to .xpm using PIL. I used the following command: Image.open( t1.png).save(a1.xpm). But it doesn't work and I could not convert it. Would you please help me and let me know that how can

Re: PIL

2010-08-03 Thread Matteo Landi
I don't think yours is a permitted conversion[1]. It seems that PIL supports xpm format only for reading, but I could be wrong. Regards. [1] http://www.daniweb.com/forums/thread260074.html On Tue, Aug 3, 2010 at 10:45 AM, Navid Parvini parvini_na...@yahoo.comwrote: Dear All, I want

Re: PIL

2010-08-03 Thread Chris Rebert
On Tue, Aug 3, 2010 at 1:45 AM, Navid Parvini parvini_na...@yahoo.com wrote: Dear All, I want to convert a .png file to .xpm using PIL. I used the following command: Image.open( t1.png).save(a1.xpm). But it doesn't work and I could not convert it. Would you please help me and let me know

Re: PIL

2010-08-03 Thread GrayShark
As we seem to be at an impasse with respect to PIL and xpm, I know gimp does support saving as xpm and that gimp has a python language console. Perhaps parvini_na...@yahoo.com, could look to the gimp mailing list for help? Steven On Tue, 03 Aug 2010 01:56:20 -0700, Chris Rebert wrote

[issue9383] PIL Bug with split

2010-07-26 Thread Arrnaud Fabre
New submission from Arrnaud Fabre arnaud...@gmail.com: import Image im = Image.open('whatever') im.split() Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/dist-packages/PIL/Image.py, line 1497, in split if self.im.bands == 1: AttributeError

[issue9383] PIL Bug with split

2010-07-26 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You should report this on the PIL bug tracker. PIL is not part of the Python standard library. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed type: crash - behavior

PIL Query

2010-07-12 Thread Ankit Jhalaria
Hi I was using the PIL. I found it pretty useful. I was wondering if you could please let me know, whether I could change the image size. What I mean is if suppose I have 100 points having the same latitude and longitude, the point on the map appears (for instance as a red circle). My question

Python 3 - Is PIL/wxPython/PyWin32 supported?

2010-07-07 Thread durumdara
Hi! I have an environment under Python 2.6 (WinXP). That is based on PIL, wxPython/PyWin32. In the project's pages I see official installer for only PyWin32. I don't know that PIL or wxPython supports Python 3 or not. May with some trick these packages are working. Does anybody know about

Re: Python 3 - Is PIL/wxPython/PyWin32 supported?

2010-07-07 Thread Daniel Fetchinson
I don't know that PIL or wxPython supports Python 3 or not. May with some trick these packages are working. Does anybody know about it? Can I replace my Py2.6 without lost PIL/wxPython? PIL currently does not support python 3 but release 1.1.7 will in the future. Don't ask me when, I don't

Re: Python 3 - Is PIL/wxPython/PyWin32 supported?

2010-07-07 Thread Giampaolo Rodolà
2010/7/7 durumdara durumd...@gmail.com: Hi! I have an environment under Python 2.6 (WinXP). That is based on PIL, wxPython/PyWin32. In the project's pages I see official installer for only PyWin32. I don't know that PIL or wxPython supports Python 3 or not. May with some trick

Problem PIL-1.1.7 _imagingft

2010-06-24 Thread Michel Claveau - MVP
Hi! With PIL-1.1.7.win32-py2.6 and Windows 7, I have this traceback: raise ImportError(The _imagingft C module is not installed) ImportError: The _imagingft C module is not installed I tested import _imaging and several other things, without success. If I re-install PIL-1.1.6 all run OK. I

Re: Problem PIL-1.1.7 _imagingft

2010-06-24 Thread Christian Heimes
Am 24.06.2010 14:39, schrieb Michel Claveau - MVP: Hi! With PIL-1.1.7.win32-py2.6 and Windows 7, I have this traceback: raise ImportError(The _imagingft C module is not installed) ImportError: The _imagingft C module is not installed I tested import _imaging and several other things

Colour TIFF support (PIL or otherwise)

2010-06-13 Thread Hans Georg Schaathun
Does anyone know how to handle TIFF images in Python? The pylab support uses PIL, and using either pylab or PIL directly, it messes up the colour scheme. It may look as if it loads CMY believing that it is RGB, but I am not absolutely sure. I have no problem handling Microsoft BMP colour images

Re: Problem displaying jpgs in Tkinter via PIL

2010-05-11 Thread Armin
and have been playing around with it using the Enthought Python distribution for Mac OS X 10.6.3 (EPD academic license, version 6.1 with python 2.6.4). It's been great learning the basics, but I've started running into problems when I'm trying to use the PIL library with Tkinter. All I'm

Re: Problem displaying jpgs in Tkinter via PIL

2010-05-11 Thread Antoine Pitrou
On Tue, 11 May 2010 09:57:01 -0700 Armin amphio...@yahoo.com wrote: Never mind, I gave up on Tkinter and have switched to wxPython now. Getting jpg images to display in a wx frame worked like a charm... (As I said, I'm very new to Python, so I didn't really know what my options for GUI

Problem displaying jpgs in Tkinter via PIL

2010-05-10 Thread Armin
Hi everyone, I'm new to Python and have been playing around with it using the Enthought Python distribution for Mac OS X 10.6.3 (EPD academic license, version 6.1 with python 2.6.4). It's been great learning the basics, but I've started running into problems when I'm trying to use the PIL

Re: PIL question

2010-04-06 Thread Peter Otten
of the image you are pasting: from PIL import Image image = Image.open(tmp1.png) image.size (134, 400) image.paste(image, (0, 0, 134, 400)) # correct size -- works image.paste(image, (0, 0, 134, 300)) # wrong size -- raises exception Traceback (most recent call last): File stdin, line 1

Re: PIL question

2010-04-06 Thread Tim Eichholz
*framew)+192, 192)) The 4-tuple doesn't match the size of the image you are pasting: from PIL import Image image = Image.open(tmp1.png) image.size (134, 400) image.paste(image, (0, 0, 134, 400)) # correct size -- works image.paste(image, (0, 0, 134, 300)) # wrong size -- raises

Re: PIL question

2010-04-06 Thread Peter Otten
Tim Eichholz wrote: I think maybe I am using the wrong function. I want to paste the entire 192x192 contents of cols[f] into newimage. I would think it works like newimage.paste(cols[f], (x, 0, 192+x, 192)) if that's not it I think I'm missing a function Don't think! Read the documentation

Re: PIL question

2010-04-06 Thread Lie Ryan
On 04/06/10 19:47, Peter Otten wrote: Tim Eichholz wrote: I think maybe I am using the wrong function. I want to paste the entire 192x192 contents of cols[f] into newimage. I would think it works like newimage.paste(cols[f], (x, 0, 192+x, 192)) if that's not it I think I'm missing a

PIL question

2010-04-05 Thread Tim Eichholz
I'm trying to cut a BMP with 80 adjacent frames down to 40 using the Image.copy and .paste functions but I'm getting error ValueError: images do not match on the paste line. Here is the source --- import sys from PIL import Image if len(sys.argv) == 2: file = sys.argv[1] else

Re: GIF89A and PIL

2010-03-29 Thread Gregory Ewing
Stephen Hansen wrote: So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. You may find that PIL isn't bothering to compress at all, or only doing it in a very simpleminded way. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: GIF89A and PIL

2010-03-29 Thread Gabriel Genellina
En Mon, 29 Mar 2010 04:41:23 -0300, Gregory Ewing greg.ew...@canterbury.ac.nz escribió: Stephen Hansen wrote: So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. You may find that PIL isn't bothering to compress at all, or only doing it in a very

Re: GIF89A and PIL

2010-03-29 Thread Cameron Simpson
On 27Mar2010 19:44, Stephen Hansen apt.shan...@gmail.invalid wrote: | Yeah, I don't expect much from PNG. The images are very small but I | might be sending a LOT of them over a pipe which is fairly tight, so | 50-60 bytes matters. That's why I selected GIF. How well does a stream of XPM files

Re: GIF89A and PIL

2010-03-28 Thread garabik-news-2005-05
Harishankar v.harishan...@gmail.com wrote: Just opening, and then saving the same file with no changes at all, resulted in a 72 byte file growing to 920. I thought it was GIF87a vs GIF89a... but have since come to determine it doesn't appear to be. I decided to give PNG a try again, since

Re: GIF89A and PIL

2010-03-27 Thread Alain Ketterlin
Stephen Hansen apt.shan...@gmail.invalid writes: Is it possible to get PIL to save GIF's in GIF89A format, instead of GIF87A? GIF89 was patented. I guess that is why it isn't used by PIL. (The patent has expired now, IIRC.) Anyway, PNG was supposed to replace GIF. If not, are there any

Re: GIF89A and PIL

2010-03-27 Thread Stephen Hansen
if there's just some hyper-optimization Photoshop does that PIL can't round-trip. GIF uses the LZW algorithm, and so does zip and gzip (the latter with an additional layer of Huffmann coding). If your images are of fixed size, you _may_ be better off compressing the raw data with a general purpose

Re: GIF89A and PIL

2010-03-27 Thread Harishankar
, and saving, results in the new file being 900 bytes too :( So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. GIF uses the LZW algorithm, and so does zip and gzip (the latter with an additional layer of Huffmann coding). If your images are of fixed

Re: GIF89A and PIL

2010-03-27 Thread Chris Colbert
, results in the new file being 900 bytes too :( So I wonder if there's just some hyper-optimization Photoshop does that PIL can't round-trip. GIF uses the LZW algorithm, and so does zip and gzip (the latter with an additional layer of Huffmann coding). If your images are of fixed size

GIF89A and PIL

2010-03-26 Thread Stephen Hansen
Hi, all. Is it possible to get PIL to save GIF's in GIF89A format, instead of GIF87A? If not, are there any decent other image libraries out there that anyone's familiar with? The only one I could find was PythonMagick, which seems completely undocumented. Or I'm blind. Ahem

Re: GIF89A and PIL

2010-03-26 Thread Lawrence D'Oliveiro
In message 2010032618455468300-aptshan...@gmailinvalid, Stephen Hansen wrote: Is it possible to get PIL to save GIF's in GIF89A format, instead of GIF87A? Why? What does GIF do for you that PNG doesn’t? -- http://mail.python.org/mailman/listinfo/python-list

Re: GIF89A and PIL

2010-03-26 Thread Stephen Hansen
On 2010-03-26 21:37:10 -0700, Lawrence D'Oliveiro said: In message 2010032618455468300-aptshan...@gmailinvalid, Stephen Hansen wrote: Is it possible to get PIL to save GIF's in GIF89A format, instead of GIF87A? Why? What does GIF do for you that PNG doesn’t? If I take this PSD and save

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-18 Thread DreiJane
Hello, i've used reportlabs over two years now and was content with its quality. These days i have turned to cairo and can only recommend to do so: It is still easier to use (than the well-designed reportlabs tools) and an engine working in a lot of other software too, for example firefox.

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-15 Thread Robin Becker
On 12/03/2010 19:29, Martin v. Löwis wrote: Not sure if this is a bug I think it is. It seems that the cross-build support in msvc9compiler has been tested only in a build tree of Python (where there is no Libs directory). This minor patch seems to fix the problem for me (using a PCBuild

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-15 Thread Astley Le Jasper
Hi Robin, It looks like you've been busy. I'm sorry but you are well over my head at the moment! :-) If you need me to test an install then I'd be happy to help. However, I just received an email from Christoph Gohlke saying: ... There are 64 bit versions of Reportlab and PIL for Python 2.6

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-12 Thread Robin Becker
Following the information from MvL I will try and get the 2.6 pyds built for amd64, I see that there's a cross platform compile technique for distutils, but am not sure if it applies to bdist_winexe etc etc. I'll have a go at this next week. -- Robin Becker --

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-12 Thread Robin Becker
On 11/03/2010 18:00, Martin v. Loewis wrote: I have a Windows 7 (64bit AMD) machine .. Perhaps some expert on the python list knows which versions of VS support 64bit; I do have VS 2005/2008 etc, but I'll probably need to set up a 64bit machine to see if they will install on a 64bit

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-12 Thread Robin Becker
On 12/03/2010 11:40, Robin Becker wrote: I assume I can get those from a working Python amd64 install and stuff on one of the compiler paths somehow. Not sure if this is a bug; I dug around a bit and find that because of the cross compilation distutils is supposed to add an extra

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-12 Thread Martin v. Löwis
Not sure if this is a bug I think it is. It seems that the cross-build support in msvc9compiler has been tested only in a build tree of Python (where there is no Libs directory). For released copies of Python, I could change that to distribute the AMD64 pythonXY.lib in libs/amd64. [FWIW, I'm

Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-11 Thread Astley Le Jasper
I have a Windows 7 (64bit AMD) machine and am having quite a lot of problems installing Reportlabs and Pil. I wondered if anyone else has had the same issues and what the best way of dealing with it. So far I've tried: 1. Reportlabs / Pil 32 installers - I've tried using these but they can't

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-11 Thread Robin Becker
On 11/03/2010 13:55, Astley Le Jasper wrote: I have a Windows 7 (64bit AMD) machine and am having quite a lot of problems installing Reportlabs and Pil. I wondered if anyone else has had the same issues and what the best way of dealing with it. So far I've tried: 1. Reportlabs / Pil 32

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-11 Thread Martin v. Loewis
of objects in your Python applications. 1. Reportlabs / Pil 32 installers - I've tried using these but they can't find python. I also tried registering Python (http://effbot.org/ zone/python-register.htm) but this also fails. Install the 32-bit version of Python, and these installers should work fine

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-11 Thread Astley Le Jasper
@Robin Thanks. I thought that this seemed to be a general python thing because it was effecting both installs. However, after also reading Martin's comments ... @Martin This is somewhat imprecise: is it a) that your CPU is AMD64, and thus supports 64-bit mode, or b) that *in addition*, your

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-11 Thread Martin v. Loewis
I’m sorry everyone. I didn’t realise I had installed the 64-bit version of Python. Well, at least someone else might find have the same problem. But I think that there is going to be a bit of a rough patch as everyone moves over to 64-bit. Expect that move to take a few more years. 64-bit

Can't install PIL on MacOS X Leopard

2010-03-10 Thread phantasm
Hello! I'm trying to install PIL module on MacOS X Leopard with python 2.6. Everything seemed to be fine - now I have PIL egg package in site- packages directory, but when I'm trying import PIL, I get an error ImportError: No module named PIL. All other modules such as SQL Alchemy work fine

Re: Can't install PIL on MacOS X Leopard

2010-03-10 Thread Ned Deily
In article 94070db2-91f0-47a8-a259-36378aab9...@o3g2000yqb.googlegroups.com, phantasm gene...@gmail.com wrote: I'm trying to install PIL module on MacOS X Leopard with python 2.6. Everything seemed to be fine - now I have PIL egg package in site- packages directory, but when I'm trying import

Re: Can't install PIL on MacOS X Leopard

2010-03-10 Thread phantasm
Thank you for your reply, Ned, but I just tried to install it again and found out that I didn't finally run python setup.py install after building PIL manually. It solved the problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-04 Thread Tim Roberts
News123 news...@free.fr wrote: Yes, this might be an option Somehow though it didn't feel right for me to depend on internal non documented data types, which might change between releases of PIL. That's absolutely true. If performance is a priority, somethimes you have to do things

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Tim, Tim Roberts wrote: News123 news...@free.fr wrote: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread Stefan Behnel
News123, 03.03.2010 01:38: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Stefan, Stefan Behnel wrote: News123, 03.03.2010 01:38: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread Stefan Behnel
and modifies a pixel of a PIL image. Check out the tutorial on the web site, and ask on the cython-users mailing list about integration with PIL. I'm sure you'll get some useful examples. Here's something closely related, although it doesn't really use PIL (but the mechanisms are the same

python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-02 Thread News123
Hi, I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image - call my c_function

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-02 Thread Tim Roberts
News123 news...@free.fr wrote: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image

Re: WCK and PIL

2010-02-07 Thread darnzen
to offer any way to retrieve the pixel data (i.e. there's no way to do the opposite of draw.paste()). I found a description of how to use a WCK drawing interface to draw into a PIL image. (http://effbot.org/zone/pil-draw-wck.htm) but I'm not sure how to use that class (SimpleDraw) to allow me to use

Re: WCK and PIL

2010-02-06 Thread Nobody
or *.gif. I was planning on using the PIL for this. I'd like to use the code I have as is, without re- writing all the graphic calls to use PIL methods. WCK uses its own pixmap class for storing images in memory. I can't find any documentation or class reference for pixmap and what I find

WCK and PIL

2010-02-05 Thread darnzen
I've written an app using the wck library (widget construction kit, see http://www.effbot.org), in addition to the wckGraph module. What I'd like to do, is take the output of one of my windows (happens to be a graph), and save it as a *.png or *.gif. I was planning on using the PIL for this. I'd

Python, PIL and 16 bit per channel images

2010-01-25 Thread Peter Chant
Does anyone know whether PIL can handle 16 bit per channel RGB images? PyPNG site (http://packages.python.org/pypng/ca.html) states PIL uses 8 bits per channel internally. Thanks, Pete -- http://www.petezilla.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, PIL and 16 bit per channel images

2010-01-25 Thread Chris Colbert
On Mon, Jan 25, 2010 at 5:04 PM, Peter Chant pet...@mpeteozilla.vco.ukewrote: Does anyone know whether PIL can handle 16 bit per channel RGB images? PyPNG site (http://packages.python.org/pypng/ca.html) states PIL uses 8 bits per channel internally. Thanks, Pete -- http

Re: PIL how to display multiple images side by side

2010-01-11 Thread suresh.amritapuri
On Jan 9, 9:51 pm, Alf P. Steinbach al...@start.no wrote: * Lie Ryan: On 1/9/2010 8:43 AM, suresh.amritapuri wrote: Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh Tkinter has PhotoImage widget and PIL has support

Re: PIL how to display multiple images side by side

2010-01-11 Thread Alf P. Steinbach
* suresh.amritapuri: On Jan 9, 9:51 pm, Alf P. Steinbach al...@start.no wrote: * Lie Ryan: On 1/9/2010 8:43 AM, suresh.amritapuri wrote: Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh Tkinter has PhotoImage widget and PIL has support

Re: PIL show() not working for 2nd pic

2010-01-09 Thread Cousin Stanley
I am using PIL for image processing in ubuntu 9.04. When i give two im.show() commands for two different images, the second image is not displayed (eye of gnome is the display program). It says no such file or directory. Any ideas? Suresh I also had problems with show() when

Re: PIL how to display multiple images side by side

2010-01-09 Thread Lie Ryan
On 1/9/2010 8:43 AM, suresh.amritapuri wrote: Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh Tkinter has PhotoImage widget and PIL has support for this widget: http://www.pythonware.com/library/pil/handbook/imagetk.htm -- http

Re: PIL how to display multiple images side by side

2010-01-09 Thread Alf P. Steinbach
* Lie Ryan: On 1/9/2010 8:43 AM, suresh.amritapuri wrote: Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh Tkinter has PhotoImage widget and PIL has support for this widget: http://www.pythonware.com/library/pil/handbook/imagetk.htm

Re: PIL show() not working for 2nd pic

2010-01-08 Thread McColgst
Do you get any errors or warnings? Could we see the code you ran to get this problem? Thanks Sean -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL show() not working for 2nd pic

2010-01-08 Thread suresh.amritapuri
On Jan 8, 6:32 am, McColgst mccol...@gmail.com wrote: Do you get any errors or warnings? Could we see the code you ran to get this problem? Thanks Sean I used to get no such file or directory showing some files in /tmp directory. But today I am getting a different type of message, which

PIL how to display multiple images side by side

2010-01-08 Thread suresh.amritapuri
Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL how to display multiple images side by side

2010-01-08 Thread Sean DiZazzo
On Jan 8, 1:43 pm, suresh.amritapuri suresh.amritap...@gmail.com wrote: Hi, In PIL, how to display multiple images in say m rows and n colums when I have m*n images. suresh Sounds like a good project to learn PIL with. ~Sean -- http://mail.python.org/mailman/listinfo/python-list

PIL show() not working for 2nd pic

2010-01-07 Thread suresh.amritapuri
Hi I am using PIL for image processing in ubuntu 9.04. When i give two im.show() commands for two different images, the second image is not displayed (eye of gnome is the display program). It says no such file or directory. Any ideas? thanks suresh -- http://mail.python.org/mailman/listinfo

Re: PIL: problem to convert an image array to PIL format

2009-12-17 Thread Robert Franke
Hi, On Thu, Dec 17, 2009 at 1:14 PM, Sverre sverreodeg...@gmail.com wrote: After converting a PIL image in memory to an array with numpy.asarray (), I make a adthreshold() with pymorph() with the result, that all pixels in the array are either false or true (boolean). But my try to convert

Re: PIL: problem to convert an image array to PIL format

2009-12-17 Thread Peter Otten
Sverre wrote: After converting a PIL image in memory to an array with numpy.asarray (), I make a adthreshold() with pymorph() with the result, that all pixels in the array are either false or true (boolean). But my try to convert this back into PIL format is failing img = Image.fromarray

Re: PIL: problem to convert an image array to PIL format

2009-12-17 Thread Sverre
On 17 Des, 15:45, Peter Otten __pete...@web.de wrote: This has come up before, see http://mail.python.org/pipermail/python-list/2009-October/1221578.html Peter Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-12-01 Thread David Robinow
On Mon, Nov 30, 2009 at 12:57 PM, Esmail ebo...@hotmail.com wrote: Hello all. I am using the PIL 1.1.6 and Python 2.6.x under XP without any problems. However, I can't display any images under Vista or Windows 7. I could understand Windows 7 as it's relatively new, but Vista has been around

Re: PIL build error on Snow Leopard

2009-12-01 Thread Ned Deily
a fresh downloaded PIL 1.1.6 but couldn't. python setup.py install gives: lipo: can't open input file: /var/tmp//ccfwpQd6.out (No such file or directory) Everything worked fine on Apple's Python 2.6.1 Building PIL on OS X is annoyingly non-trivial and this subject is one that comes up

Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Esmail
Hello all. I am using the PIL 1.1.6 and Python 2.6.x under XP without any problems. However, I can't display any images under Vista or Windows 7. I could understand Windows 7 as it's relatively new, but Vista has been around for a bit. Sample code: import Image im = Image.open('c

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Esmail
  im = Image.open('c://mypic.jpg') sorry, slip of the finger, there's only one forward slash or you can use two backward slashes. The problem isn't with opening it (I know it opens fine since I can get its size attribute via im.size) - the show() is the problem. Esmail --

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Stephen Hansen
On Mon, Nov 30, 2009 at 9:57 AM, Esmail ebo...@hotmail.com wrote: Hello all. I am using the PIL 1.1.6 and Python 2.6.x under XP without any problems. However, I can't display any images under Vista or Windows 7. I could understand Windows 7 as it's relatively new, but Vista has been around

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Lie Ryan
() is the problem. What's your default image viewer? im.show is intended to be for debugging purpose and may always guaranteed to work if your image viewer doesn't support receiving the file through I don't know how PIL passes the image to the program. -- http://mail.python.org/mailman/listinfo/python

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Esmail
On Nov 30, 3:08 pm, Lie Ryan lie.1...@gmail.com wrote: What's your default image viewer? im.show is intended to be for debugging purpose and may always guaranteed to work if your image viewer doesn't support receiving the file through I don't know how PIL passes the image to the program

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread David Bolen
at least you'll know the exact command being used. If that's the issue, there are various ways around it. You could patch PIL itself (same function) to quote the filename when it is constructing the command. Alternatively, the tempfile module has a tempdir global you could set to some other temporary

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Esmail
(bottom of _showxv function in Image.py in my copy of 1.1.6).  That way at least you'll know the exact command being used. If that's the issue, there are various ways around it.  You could patch PIL itself (same function) to quote the filename when it is constructing the command.  Alternatively

PIL build error on Snow Leopard

2009-11-30 Thread Xiao
Hello, I haven't fully understood the nuances in the difference between Apple's system Python and MacPython. But I have just installed Python 2.6.4 from python.org. Now I'm trying to install a fresh downloaded PIL 1.1.6 but couldn't. python setup.py install gives: lipo: can't open input file

Re: Python PIL and Vista/Windows 7 .. show() not working ...

2009-11-30 Thread Terry Reedy
Esmail wrote: On Nov 30, 4:37 pm, David Bolen db3l@gmail.com wrote: If that's the issue, there are various ways around it. You could patch PIL itself (same function) to quote the filename when it is constructing the command. Alternatively, the tempfile module has a tempdir global you

PIL Image.fromarray( ... , mode=1 )

2009-10-31 Thread Hans Georg Schaathun
Does anyone know how to save two-tone images represented as numpy arrays? I handle grayscale images by converting to PIL Image objects (mode=L) and then use the PIL save method, but I cannot make this work with mode=1. I have tried both boolean arrays and uint8 arrays (mod 2). In both cases I

Re: PIL : How to write array to image ???

2009-10-06 Thread Scott David Daniels
Mart. wrote: On Oct 5, 5:14 pm, Martin mar...@hvidberg.net wrote: On Oct 4, 10:16 pm, Mart. mdeka...@gmail.com wrote: On Oct 4, 9:47 am, Martin mar...@hvidberg.net wrote: On Oct 3, 11:56 pm, Peter Otten __pete...@web.de wrote: Martin wrote: Dear group I'm trying to use PIL to write

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-10-05 Thread Fredrik Lundh
The problem is that too many people arguing for eggs do this by sending nastygrams, which doesn't really provide much motivation for doing anything about it (I don't do asshole-driven development). The public review PIL got a couple a minutes ago matches some of the private mail I've gotten

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-10-05 Thread Chris Withers
to this. My (hopefully more polite) request still stands though: Would there be any problems for you in naming the distribution in a setuptools-friendly way from the next point release? The public review PIL got a couple a minutes ago matches some of the private mail I've gotten: no egg - worst

Re: PIL : How to write array to image ???

2009-10-05 Thread Mart.
On Oct 5, 5:14 pm, Martin mar...@hvidberg.net wrote: On Oct 4, 10:16 pm, Mart. mdeka...@gmail.com wrote: On Oct 4, 9:47 am, Martin mar...@hvidberg.net wrote: On Oct 3, 11:56 pm, Peter Otten __pete...@web.de wrote: Martin wrote: Dear group I'm trying to use PIL to write

Re: PIL : How to write array to image ???

2009-10-04 Thread Martin
On Oct 3, 11:56 pm, Peter Otten __pete...@web.de wrote: Martin wrote: Dear group I'm trying to use PIL to write an array (a NumPy array to be exact) to an image. Peace of cake, but it comes out looking strange. I use the below mini code, that I wrote for the purpose. The print

Re: PIL : How to write array to image ???

2009-10-04 Thread Mart.
On Oct 4, 9:47 am, Martin mar...@hvidberg.net wrote: On Oct 3, 11:56 pm, Peter Otten __pete...@web.de wrote: Martin wrote: Dear group I'm trying to use PIL to write an array (a NumPy array to be exact) to an image. Peace of cake, but it comes out looking strange. I use

PIL : How to write array to image ???

2009-10-03 Thread Martin
Dear group I'm trying to use PIL to write an array (a NumPy array to be exact) to an image. Peace of cake, but it comes out looking strange. I use the below mini code, that I wrote for the purpose. The print of a looks like expected: [[ 200. 200. 200. ...,0.0.0.] [ 200. 200

Re: PIL : How to write array to image ???

2009-10-03 Thread Robert Kern
Martin wrote: Dear group I'm trying to use PIL to write an array (a NumPy array to be exact) to an image. Peace of cake, but it comes out looking strange. I use the below mini code, that I wrote for the purpose. The print of a looks like expected: [[ 200. 200. 200. ...,0.0.0

Re: PIL : How to write array to image ???

2009-10-03 Thread Peter Otten
Martin wrote: Dear group I'm trying to use PIL to write an array (a NumPy array to be exact) to an image. Peace of cake, but it comes out looking strange. I use the below mini code, that I wrote for the purpose. The print of a looks like expected: [[ 200. 200. 200. ...,0.0

<    1   2   3   4   5   6   7   8   9   10   >