SVG PIL decoder

2009-09-30 Thread Patrick Sabin
I would like to open svg files with PIL, but svg doesn't seem to be supported. Does anyone know about a svg decoder for the PIL? - Patrick -- http://mail.python.org/mailman/listinfo/python-list

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

2009-09-30 Thread Chris Withers
Fredrik Lundh wrote: On Fri, Sep 11, 2009 at 3:49 PM, Chris Withers ch...@simplistix.co.uk wrote: Klein Stéphane wrote: Resume : 1. first question : why PIL package in pypi don't work ? Because Fred Lundh have his package distributions unfortunate names that setuptools doesn't like

Re: SVG PIL decoder

2009-09-30 Thread Donn
On Wednesday 30 September 2009 18:01:50 Patrick Sabin wrote: I would like to open svg files with PIL, but svg doesn't seem to be supported. Does anyone know about a svg decoder for the PIL? Have a look at Cairo (python-cairo) in conjunction with librsvg (python-rsvg) -- that'll fix you up. You

Re: SVG PIL decoder

2009-09-30 Thread Patrick Sabin
Donn wrote: Have a look at Cairo (python-cairo) in conjunction with librsvg (python-rsvg) -- that'll fix you up. You can go from an SVG to a PNG/array and thence into PIL if you need to. Thanks for the tip. Got it work, although it was a bit tricky, as resizing doesn't seem to be supported

Re: SVG PIL decoder

2009-09-30 Thread Donn
On Thursday 01 October 2009 01:08:28 Patrick Sabin wrote: Thanks for the tip. Got it work, although it was a bit tricky, as resizing doesn't seem to be supported by python-rsvg and cairo.ImageSurface.create_from_png doesn't allow StringIO or My best suggestions are to visit the Cairo website --

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

2009-09-28 Thread Fredrik Lundh
On Fri, Sep 11, 2009 at 3:49 PM, Chris Withers ch...@simplistix.co.uk wrote: Klein Stéphane wrote: Resume : 1. first question : why PIL package in pypi don't work ? Because Fred Lundh have his package distributions unfortunate names that setuptools doesn't like... It used to support

Re: Some issue with easy_install and PIL/Imaging

2009-09-28 Thread Klein Stéphane
Fredrik Lundh a écrit : On Fri, Sep 11, 2009 at 3:49 PM, Chris Withers ch...@simplistix.co.uk wrote: Klein Stéphane wrote: Resume : 1. first question : why PIL package in pypi don't work ? Because Fred Lundh have his package distributions unfortunate names that setuptools doesn't like

Re: Some issue with easy_install and PIL/Imaging

2009-09-11 Thread Chris Withers
Klein Stéphane wrote: Resume : 1. first question : why PIL package in pypi don't work ? Because Fred Lundh have his package distributions unfortunate names that setuptools doesn't like... 2. second question : when I add PIL dependence in my setup.py and I do python setup.py develop

Some issue with easy_install and PIL/Imaging

2009-09-09 Thread Klein Stéphane
Hi, I would like to insert Imaging dependence in my setup.py file. Resume : 1. first question : why PIL package in pypi don't work ? 2. second question : when I add PIL dependence in my setup.py and I do python setup.py develop, I've this error : error: Could not find required

Re: PIL and Python

2009-08-22 Thread catafest
If I make it work, i will send the solution. Thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL and Python

2009-08-21 Thread catafest
    prgCXC1250321_ORANGE_HN 4.5 This is the data i want edit it to make some copyright for my site. I don't know about PIL but you might want to try exif.py.http://sourceforge.net/projects/exif-py/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL and Python

2009-08-21 Thread Michele Petrazzo
catafest wrote: I don't extract data from jpegs. I wanna put some data in this (copyright of my site) ... My wrap for freeimage, called freeimagepy :) can't, as now, wrote exif information on the image, but since freeimage can do it, I think that it's not so difficult to add this type of

Re: PIL and Python

2009-08-20 Thread catafest
On my photo jpg i have this : Image Type: jpeg (The JPEG image format) Width: 1224 pixels Height: 1632 pixels Camera Brand: Sony Ericsson Camera Model: W810i Date Taken: 2009:07:09 08:16:21 Exposure Time: 1/19 sec. ISO Speed Rating: 320 Flash Fired: Flash did not fire, compulsory flash mode.

Re: PIL and Python

2009-08-20 Thread MaxTheMouse
Rating: 320 Flash Fired: Flash did not fire, compulsory flash mode. Metering Mode: Center-Weighted Average Software: R4EA031     prgCXC1250321_ORANGE_HN 4.5 This is the data i want edit it to make some copyright for my site. I don't know about PIL but you might want to try exif.py. http

PIL and Python

2009-08-13 Thread catalinf...@gmail.com
Hello ! I want use python to change the note from .jpeg files . What is the functions on PIL how make this ? Thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL and Python

2009-08-13 Thread Martin
On Aug 13, 1:55 pm, catalinf...@gmail.com catalinf...@gmail.com wrote: Hello ! I want use python to change the note from .jpeg files . What is the functions on PIL how make this ? Thank you ! What do u mean by the note? -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL and Python

2009-08-13 Thread Nobody
On Thu, 13 Aug 2009 16:38:07 -0700, Martin wrote: I want use python to change the note from .jpeg files . What is the functions on PIL how make this ? What do u mean by the note? I think he means the EXIF data. -- http://mail.python.org/mailman/listinfo/python-list

Freetype2 in PIL

2009-07-24 Thread moerchendiser2k3
works fine on Windows 64 bit and the installer can find them. But I just get a Freetype2 not found. Even renaming it to freetype.lib and freetype2.lib doesnt work. Any suggestions why PIL cant find the library? Bye and thanks in advance :) -- http://mail.python.org/mailman/listinfo/python-list

Freetype2 in PIL

2009-07-24 Thread moerchendiser2k3
works fine on Windows 64 bit and the installer can find them. But I just get a Freetype2 not found. Even renaming it to freetype.lib and freetype2.lib doesnt work. Any suggestions why PIL cant find the library? Bye and thanks in advance :) -- http://mail.python.org/mailman/listinfo/python-list

raster (PIL)

2009-07-23 Thread superpollo
hi. i wrote a program which transforms a string of zeroes ando ones into a png file. #!/usr/bin/env python import Image import sys bits_in_a_byte = 8 raster_string = \ 0010010000101000 00100100101010100100

Re: raster (PIL)

2009-07-23 Thread Diez B. Roggisch
superpollo wrote: hi. i wrote a program which transforms a string of zeroes ando ones into a png file. #!/usr/bin/env python import Image import sys bits_in_a_byte = 8 raster_string = \ 0010010000101000

Re: raster (PIL)

2009-07-23 Thread Peter Otten
superpollo wrote: i wrote a program which transforms a string of zeroes ando ones into a png file. #!/usr/bin/env python import Image import sys bits_in_a_byte = 8 raster_string = \ 0010010000101000 00100100101010100100

Re: raster (PIL)

2009-07-23 Thread superpollo
Diez B. Roggisch wrote: superpollo wrote: ... high = len(raster_lines) wide = len(raster_lines[0]) bytes_in_a_row = wide/bits_in_a_byte This will give you the wrong result if not divideable by bits_in_a_byte. then maybe: #!/usr/bin/env python import Image import sys bits_in_a_byte = 8

Re: raster (PIL)

2009-07-23 Thread superpollo
Peter Otten wrote: superpollo wrote: i wrote a program which transforms a string of zeroes ando ones into a png file. ... any suggestions for improvement? ... Here's a different approach: ... The idea is to move the bit-twiddling from python to code written in C, pointless for such a

Re: raster (PIL)

2009-07-23 Thread superpollo
Peter Otten wrote: ... Here's a different approach: ... raster_string = ... width = raster_string.index(\n) height = raster_string.count(\n) your approach has a funny side-effect: try to remove just one zero from the first line of the raster ;-) bye --

Re: raster (PIL)

2009-07-23 Thread superpollo
Peter Otten wrote: ... im.convert(1).save(sys.stdout, PNG) ... a q about pil: im.convert(1) is different from: im2 = im.convert(1) right? in the former im is changed (the method applies to im) but in the latter im is unchanged (first im is copied unto im2 and then the method is applied

Re: raster (PIL)

2009-07-23 Thread Diez B. Roggisch
superpollo wrote: Diez B. Roggisch wrote: superpollo wrote: ... high = len(raster_lines) wide = len(raster_lines[0]) bytes_in_a_row = wide/bits_in_a_byte This will give you the wrong result if not divideable by bits_in_a_byte. then maybe: #!/usr/bin/env python import Image

Re: raster (PIL)

2009-07-23 Thread Peter Otten
superpollo wrote: Peter Otten wrote: ... im.convert(1).save(sys.stdout, PNG) ... a q about pil: im.convert(1) is different from: im2 = im.convert(1) right? in the former im is changed (the method applies to im) but in the latter im is unchanged (first im is copied unto im2

Re: raster (PIL)

2009-07-23 Thread superpollo
Peter Otten wrote: superpollo wrote: Peter Otten wrote: ... im.convert(1).save(sys.stdout, PNG) ... a q about pil: im.convert(1) is different from: im2 = im.convert(1) right? in the former im is changed (the method applies to im) but in the latter im is unchanged (first im is copied

Re: raster (PIL)

2009-07-23 Thread Peter Otten
superpollo wrote: Peter Otten wrote: superpollo wrote: Peter Otten wrote: ... im.convert(1).save(sys.stdout, PNG) ... a q about pil: im.convert(1) is different from: im2 = im.convert(1) right? in the former im is changed (the method applies to im) but in the latter im is unchanged

PIL for OSX 64bit

2009-07-21 Thread moerchendiser2k3
Hi, I have a problem with Python and the Python Image Library to get it work on OSX 64 bit. Maybe anyone can help me? I started Python in 64 bit mode and called Image.open(...).load() and got: ImportError: The _imaging C module is not installed Yes, it seems PIL is not available in 64 bit on my

Re: PIL for OSX 64bit

2009-07-21 Thread Ned Deily
Image.open(...).load() and got: ImportError: The _imaging C module is not installed [...] It's hard to know what your problem is without more information. One potential stumbling block: PIL has dependencies on other open-source libraries, such as libjpeg and freetype. You'll need to have 64

Re: PIL Python Imaging Library

2009-06-08 Thread Tim Harig
On 2009-06-08, Xah Lee xah...@gmail.com wrote: is there a python image library that does pretty much what imagemagick does? http://www.pythonware.com/products/pil/ -- http://mail.python.org/mailman/listinfo/python-list

Building PIL under Cygwin Python 2.5

2009-05-28 Thread Erik Johnson
://blog.datahammer.info/2008/11/install-pil-under-cygwin-python-25.html After following it's advice and running: $ ./rebase -b 0x10 tk84.dll I was able to get the PIL build to proceed, but when it was done, it said that there was no support built for Tk, and I then noticed that basic Tkinter

PIL, and Parts of tuples

2009-04-13 Thread Vistro
I have two problems, and I can't find anything about either of them. The first is that PIL does not seem to have any way to search each and every pixel for a value, like for pixel in img: if pixel = ((60, 30), (58, 23), (87 57)): # Get out of the for loop # Also, save

Re: PIL, and Parts of tuples

2009-04-13 Thread Chris Rebert
On Mon, Apr 13, 2009 at 1:34 PM, Vistro vis...@vistro.net wrote: I have two problems, and I can't find anything about either of them. The first is that PIL does not seem to have any way to search each and every pixel for a value, like for pixel in img:     if pixel = ((60, 30), (58, 23), (87

Re: PIL, and Parts of tuples

2009-04-13 Thread Vistro
, Chris Rebert c...@rebertia.com wrote: On Mon, Apr 13, 2009 at 1:34 PM, Vistro vis...@vistro.net wrote: I have two problems, and I can't find anything about either of them. The first is that PIL does not seem to have any way to search each and every pixel for a value, like for pixel in img

Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
I have an image of described as: Img Info: {} size: (640, 480) format: None mode: P palette: ImagePalette.ImagePalette instance at 0x02393378 bands: ('P',) type: type 'instance' I'd like to write it to a file. Apparently, I need to convert it to a string first. How do I do that?

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread Diez B. Roggisch
. How do I do that? Pickle? Did you bother reading the PIL documentation just for about 30seconds? http://www.pythonware.com/library/pil/handbook/image.htm Hint: look for save. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
to convert it to a string first. How do I do that? Pickle? Did you bother reading the PIL documentation just for about 30seconds? http://www.pythonware.com/library/pil/handbook/image.htm Hint: look for save. Diez So, you are telling me what? To save it as a jpg file, or maybe a bmp file? All of them

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread MRAB
W. eWatson wrote: I have an image of described as: Img Info: {} size: (640, 480) format: None mode: P palette: ImagePalette.ImagePalette instance at 0x02393378 bands: ('P',) type: type 'instance' I'd like to write it to a file. Apparently, I need to convert it to a string first.

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread W. eWatson
it to a string first. How do I do that? Pickle? Have you tried the .tostring() method? Perfect. Works exactly like I had hoped, 640x480 bytes--nothing more. Thanks. I had noticed it, but didn't get the connection. Then I wandered around nearby in the PIL description, and noticed something about decoding

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread Diez B. Roggisch
. Apparently, I need to convert it to a string first. How do I do that? Pickle? Did you bother reading the PIL documentation just for about 30seconds? http://www.pythonware.com/library/pil/handbook/image.htm Hint: look for save. Diez So, you are telling me what? To save it as a jpg file, or maybe

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread MRAB
to write it to a file. Apparently, I need to convert it to a string first. How do I do that? Pickle? Did you bother reading the PIL documentation just for about 30seconds? http://www.pythonware.com/library/pil/handbook/image.htm Hint: look for save. Diez So, you are telling me what? To save

Re: Writing a Raw Image to a File (Win, PIL)

2009-04-11 Thread Diez B. Roggisch
' I'd like to write it to a file. Apparently, I need to convert it to a string first. How do I do that? Pickle? Did you bother reading the PIL documentation just for about 30seconds? http://www.pythonware.com/library/pil/handbook/image.htm Hint: look for save. Diez So, you are telling me what

Re: Problem with PIL/Tkinter Program Example

2009-04-09 Thread Peter Otten
=ImageTk.PhotoImage(img) NameError: global name 'ImageTk' is not defined If you want to use the ImageTk module you have to import it first: #Mouse movement from Tkinter import * import PIL import Image import ImageTk [rest of your code here] Peter -- http://mail.python.org/mailman/listinfo/python-list

Problem with PIL/Tkinter Program Example

2009-04-09 Thread W. eWatson
Something is amiss here. The program produces a canvas in which one can move an object around. The input file is hard coded (see open). If you want to try it, you'll need to provide a file. Python error below. Name space difficulty? #Mouse movement from Tkinter import * import PIL import

Re: Problem with PIL/Tkinter Program Example

2009-04-09 Thread W. eWatson
data.img=ImageTk.PhotoImage(img) NameError: global name 'ImageTk' is not defined If you want to use the ImageTk module you have to import it first: #Mouse movement from Tkinter import * import PIL import Image import ImageTk [rest of your code here] Peter Very good. Thanks

PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
Basically, I'd like to know how one (broadly, e.g., references in Win-land) does IP (image processing) and drawing techniques such as rubber lines, and dragging image objects across the canvas. I know there are some pretty powerful toolkits out there, but I'd like to limit this to PIL

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread Eric Brunel
this to PIL and Tkinter. If it can't be done with them, then I'll consider other possibilities. As a starter, on the topic of transparencies, consider this program that I pulled off the web and was posted in 1999. It purports to illustrate how one might produce a transparency. OK, maybe I'm dumb

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
(image processing) and drawing techniques such as rubber lines, and dragging image objects across the canvas. I know there are some pretty powerful toolkits out there, but I'd like to limit this to PIL and Tkinter. If it can't be done with them, then I'll consider other possibilities. As a starter

Re: Converting a PIL image object to a buffer

2009-04-07 Thread Gabriel Genellina
En Wed, 01 Apr 2009 19:20:43 -0300, Simon Hibbs simon.hi...@gmail.com escribió: On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data

Re: Converting a PIL image object to a buffer

2009-04-02 Thread Diez B. Roggisch
Simon Hibbs schrieb: On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data into a PIL image object, which i have converted to a bitmap using

PIL Handbooks

2009-04-02 Thread W. eWatson
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 for 1.1.3 (PDF) Somewhere in my recent search I see that 1.1.6 has

Re: Converting a PIL image object to a buffer

2009-04-02 Thread Simon Hibbs
On 2 Apr, 08:28, Diez B. Roggisch de...@nospam.web.de wrote: Simon Hibbs schrieb: On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data

Re: PIL Handbooks

2009-04-02 Thread Irmen de Jong
W. eWatson 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 for 1.1.3 (PDF) Somewhere in my recent search I

Re: PIL Handbooks

2009-04-02 Thread W. eWatson
Irmen de Jong wrote: W. eWatson 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 for 1.1.3 (PDF) Somewhere

Default Tkinter Structure of a 640x480 PIL BMP File?

2009-04-01 Thread W. eWatson
See Subject. Does it have a header, DIB, palette, and data section? What is the default depth? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7 N, 121° 2' 32 W, 2700 feet Web

Converting a PIL image object to a buffer

2009-04-01 Thread Simon Hibbs
I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data into a PIL image object, which i have converted to a bitmap using ImageWin, but when I try to pass this to the clipboard using - win32clipboard.SetClipboardData

Re: Converting a PIL image object to a buffer

2009-04-01 Thread Gary Herron
Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data into a PIL image object, which i have converted to a bitmap using ImageWin, but when I try to pass this to the clipboard using

Re: Converting a PIL image object to a buffer

2009-04-01 Thread Simon Hibbs
On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data into a PIL image object, which i have converted to a bitmap using ImageWin, but when

Re: Python Imaging Library (PIL): create PDF from scratch

2009-02-25 Thread zelegolas
Like David said now i used PIL for individual images and reportlab to generate a pdf. Thanks for your advices :) -- http://mail.python.org/mailman/listinfo/python-list

Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread zelegolas
Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF. I'm not even sure

Re: Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread Steve Holden
zelegolas wrote: Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF

Re: Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread Scott David Daniels
zelegolas wrote: Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF. I'm

Re: PIL install driving me mad! With solution!

2009-02-19 Thread Hendrik van Rooyen
bleah jo...@ph...arizona.edu wrote: I'm trying to get PIL 1.16 installed on a SUSE SLES10 system, and cannot, for the life of me, get the thing to compile with jpeg support. The libjpeg-devel libraries are installed, and are present in /usr/lib JUST WHERE SPECIFIED in the setup.py file

PIL install driving me mad! With solution!

2009-02-18 Thread bleah
I'm trying to get PIL 1.16 installed on a SUSE SLES10 system, and cannot, for the life of me, get the thing to compile with jpeg support. The libjpeg-devel libraries are installed, and are present in /usr/lib JUST WHERE SPECIFIED in the setup.py file, and the jpeglib.h incliude file is present

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread W. eWatson
r wrote: Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) Yes, that's true, but the big question is how to see the final image? Either one

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread Peter Otten
W. eWatson wrote: r wrote: Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) Yes, that's true, but the big question is how to see the

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread Bill McClain
On 2009-01-28, W. eWatson notval...@sbcglobal.net wrote: Yes, that's true, but the big question is how to see the final image? Either one employees another module or writes the file into a folder, then displays it with a paint program? Does im.show() not work? -Bill -- Sattre Press

Windows PIL installer question

2009-01-28 Thread cjl
Is there any way to run the PIL installer from the command line on Windows in 'silent' mode, without displaying the install screens or requiring user interaction? -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows PIL installer question

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 15:07:54 -0200, cjl cjl...@gmail.com escribió: Is there any way to run the PIL installer from the command line on Windows in 'silent' mode, without displaying the install screens or requiring user interaction? Is it a .msi? msiexec /i filename.msi /quiet /log path

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread W. eWatson
((0, 0) + im.size, fill=128) draw.line(((0,0),(20,140)), fill=128) root = tk.Tk() pi = ImageTk.PhotoImage(im) label = tk.Label(root, image=pi) label.pack() root.mainloop() Peter My initial quest was to do it in PIL. That seems impossible, and the way out is Tkinter. I'm not yet savvy enough

Drawing and Displaying an Image with PIL

2009-01-27 Thread W. eWatson
Here's my program: # fun and games import Image, ImageDraw im = Image.open(wagon.tif) # it exists in the same Win XP # folder as the program draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128) draw.line((0,0),(20,140), fill=128) # How show this final image on a display?

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
On Jan 27, 9:15 pm, W. eWatson notval...@sbcglobal.net wrote: Here's my program: # fun and games import Image, ImageDraw im = Image.open(wagon.tif) # it exists in the same Win XP # folder as the program draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128)

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread W. eWatson
r wrote: On Jan 27, 9:15 pm, W. eWatson notval...@sbcglobal.net wrote: Here's my program: # fun and games import Image, ImageDraw im = Image.open(wagon.tif) # it exists in the same Win XP # folder as the program draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128)

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) -- http://mail.python.org/mailman/listinfo/python-list

Re: using PIL for PCA analysis

2009-01-13 Thread Jan Erik Solem
if i want to do an array of PIL image data i can use img=Image.open(myimg.jpg) .convert(L) pixelarray=img.getdata() convert(L) is a good way to make images grayscale. An option to using getdata() is to try numpy's array: pixelarray = numpy.array(img) this gives lots of possibilities

Re: PIL on 3.x?

2008-12-31 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Actually, Guilherme Polo has ported PIL 1.1.6 to python 3.0: http://mail.python.org/pipermail/image-sig/2008-December/005338.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http

Re: PIL - font kerning

2008-12-30 Thread carsn
On Dec 23, 9:51 pm, Ivan Illarionov ivan.illario...@gmail.com wrote: On Dec 23, 11:22 pm, Ivan Illarionov ivan.illario...@gmail.com wrote: On 23 дек, 16:44, carsn carsten.kr...@gmail.com wrote: Hey all, anybody know, if there´s a way to specify the kerning of a font, when you

PIL - font kerning

2008-12-23 Thread carsn
Hey all, anybody know, if there´s a way to specify the kerning of a font, when you draw text with PIL? I´d like to achieve the same effect that you get, when you set a negative kerning in Gimp/Photshop - ie. reduce the spacing between glyphs. Can PIL do that or do I use another lib

Re: PIL - font kerning

2008-12-23 Thread Ivan Illarionov
On 23 дек, 16:44, carsn carsten.kr...@gmail.com wrote: Hey all, anybody know, if there´s a way to specify the kerning of a font, when you draw text with PIL? I´d like to achieve the same effect that you get, when you set a negative kerning in Gimp/Photshop - ie. reduce the spacing between

Re: PIL - font kerning

2008-12-23 Thread Ivan Illarionov
On Dec 23, 11:22 pm, Ivan Illarionov ivan.illario...@gmail.com wrote: On 23 дек, 16:44, carsn carsten.kr...@gmail.com wrote: Hey all, anybody know, if there´s a way to specify the kerning of a font, when you draw text with PIL? I´d like to achieve the same effect that you get, when you

Re: PIL on 3.x?

2008-12-20 Thread Diez B. Roggisch
Méta-MCI (MVP) schrieb: Hi! This info is interesting for many people. IMO, it's a good idea to write the question in this newsgroup. Which only makes sense if the author of PIL reads it. Which he seems not to (or at least doesn't answer here, as he used to). Diez -- http://mail.python.org

Re: PIL on 3.x?

2008-12-20 Thread M�ta-MCI (MVP)
Hi! Fredrik Lundh (Pythonware ; the author of PIL (and ElementTree, and many other things)) had, in the past, often give answers. To me, like to others people. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-20 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? No, I haven't because in my experience open source software authors prefer to keep discussion of their software on mailing lists, forums, etc, where others can benefit from the answers too

Re: PIL on 3.x?

2008-12-20 Thread John Machin
On Dec 21, 12:32 pm, Daniel Fetchinson fetchin...@googlemail.com wrote: Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? No, I haven't because in my experience open source software authors prefer to keep discussion of their software

PIL on 3.x?

2008-12-19 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-19 Thread John Machin
On Dec 20, 6:55 am, Daniel Fetchinson fetchin...@googlemail.com wrote: Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-19 Thread M�ta-MCI (MVP)
Hi! This info is interesting for many people. IMO, it's a good idea to write the question in this newsgroup. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: something else instead of PIL?

2008-12-18 Thread imageguy
On Dec 17, 3:48 pm, Reimar Bauer r.ba...@fz-juelich.de wrote: Hi what has happened to PIL? No updates since two years. Or does one know an alternative lib for resizing images? cheers Reimar I have found the FreeImage library with the Python bindings quite workable. I work with multi-page

Re: something else instead of PIL?

2008-12-18 Thread Reimar Bauer
s...@pobox.com schrieb: Reimar Hi what has happened to PIL? No updates since two years. It's well-written, stable code. As far as I know it does what people want (at least it's done everything I've needed when I've used it). Why should it matter that there hasn't been an official

Re: something else instead of PIL?

2008-12-18 Thread Reimar Bauer
imageguy schrieb: On Dec 17, 3:48 pm, Reimar Bauer r.ba...@fz-juelich.de wrote: Hi what has happened to PIL? No updates since two years. Or does one know an alternative lib for resizing images? cheers Reimar I have found the FreeImage library with the Python bindings quite workable. I

Re: something else instead of PIL?

2008-12-18 Thread skip
Reimar I am interested to get some new features added e.g. some special Reimar conversion routines for colorblind people. Reimar http://scien.stanford.edu/class/psych221/projects/05/ofidaner/colorblindness_project.htm Reimar How can that be archieved? Contact Fredrik Lundh?

something else instead of PIL?

2008-12-17 Thread Reimar Bauer
Hi what has happened to PIL? No updates since two years. Or does one know an alternative lib for resizing images? cheers Reimar -- http://mail.python.org/mailman/listinfo/python-list

Re: something else instead of PIL?

2008-12-17 Thread skip
Reimar Hi what has happened to PIL? No updates since two years. It's well-written, stable code. As far as I know it does what people want (at least it's done everything I've needed when I've used it). Why should it matter that there hasn't been an official release in two years? -- Skip

Re: something else instead of PIL?

2008-12-17 Thread Chris Rebert
On Wed, Dec 17, 2008 at 12:48 PM, Reimar Bauer r.ba...@fz-juelich.de wrote: Hi what has happened to PIL? No updates since two years. The Python Imaging Library is still current; I guess they just haven't found any new bugs or seen fit to add new functionality in a while, though I presume

Re: something else instead of PIL?

2008-12-17 Thread Daniel Fetchinson
what has happened to PIL? No updates since two years. The Python Imaging Library is still current; I guess they just haven't found any new bugs or seen fit to add new functionality in a while, though I presume they'll start working on a Python 3.0 port eventually. That's actually

PIL (python imaging library) or Mathematics help both appreciated

2008-11-24 Thread amine
well, here is the background. I have images of objects (cars, clothes, ...) with a white background in most of the cases I have to build a function with PIL that takes away the background. it seems simple, just look for the white and make it transparent but the problem is in reality much more

Re: PIL (python imaging library) or Mathematics help both appreciated

2008-11-24 Thread Arnaud Delobelle
Well not much maths in my answers but... On 24 Nov, 08:52, amine [EMAIL PROTECTED] wrote: well, here is the background.  I have images of objects (cars, clothes, ...) with a white background in most of the cases I have to build a function with PIL that takes away the background. it seems

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