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
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 =
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
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the image, but when I try to crop
the image, it won't crop. Here are the relevant code snippets:
### Function I am testing ###
def create_square_image(file_name):
Creates a thumbnail sized
On Wed, 08 Oct 2008 08:10:02 -0700, bfrederi wrote:
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the image, but when I try to crop
the image, it won't crop. Here are the relevant code snippets:
### Function I am testing ###
def
On Oct 8, 10:30 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Wed, 08 Oct 2008 08:10:02 -0700, bfrederi wrote:
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the image, but when I try to crop
the image, it won't crop. Here
On Oct 8, 10:39 am, bfrederi [EMAIL PROTECTED] wrote:
On Oct 8, 10:30 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Wed, 08 Oct 2008 08:10:02 -0700, bfrederi wrote:
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the
On Oct 8, 10:39 am, bfrederi [EMAIL PROTECTED] wrote:
On Oct 8, 10:30 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Wed, 08 Oct 2008 08:10:02 -0700, bfrederi wrote:
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the
bfrederi wrote:
image.crop((x1,y1,x2,y2))
This doesn't change `image` but creates and returns a new cropped image
which you simply ignore.
image.save(file_name, JPEG)
Ciao,
Marc 'BlackJack' Rintsch
How do I output it to an actual file then? Or overwrite the existing
file?
bfrederi [EMAIL PROTECTED] writes:
I am having a problem using PIL. I am trying to crop and image to a
square, starting from the center of the image, but when I try to crop
the image, it won't crop. Here are the relevant code snippets:
### Function I am testing ###
def
Hi;
I´ve installed Zope 2.10.5 on top of Python 2.4.2 (not optimal, but it will
work, according to the build instructions). I installed Plone 3.0.2 and I get
errors when I crank up Zope, all related to a non-existent PIL. So I d/l/d the
latest PIL, plopped it in my Extensions dir, ran this:
Hi,
I installed the newest available PIL (1.1.5 for Python 2.4) from their
site, but cannot seem to open any files. The following
from PIL import Image
i = Image.open(file('c:\\image2.png'))
results in
File C:\Program Files\Python24\lib\site-packages\PIL\Image.py, line
1745, in open
Doh! Apparently Image.open() wants a path, not a file. So
i = Image.open('c:\\image2.png')
works fine.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Doh! Apparently Image.open() wants a path, not a file. So
i = Image.open('c:\\image2.png')
works fine.
it works fine on files too, if you open them in *binary* mode.
/F
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Lad wrote:
I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source
libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in
/usr/local/lib I have the following files: cjpeg
,djpeg,jpegtran,rdjpgcom and wrjpgcom
cjpeg, djpeg etc are executables, not
Fredrik Lundh wrote:
Lad wrote:
I installed PIL under Linux but now when I try it I get the error:
decoder jpeg not available
How can I correct that problem?
if you built PIL yourself, the setup script told you how to fix this.
- make sure you have right libraries installed
I had similar problems a couple of months back when I was teaching
myself Tkinter and PIL. I wrote up my experiences here:-
http://www.aqzj33.dsl.pipex.com/how_i_learned_tkinter/contents.htm
If you look at the section on Images you will see how I eventually
solved it (with bucket loads of help
Lad wrote:
I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source
libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in
/usr/local/lib I have the following files: cjpeg
,djpeg,jpegtran,rdjpgcom and wrjpgcom
cjpeg, djpeg etc are executables, not libraries. if you have
I installed PIL under Linux but now when I try it I get the error:
decoder jpeg not available
How can I correct that problem?
Thank you for help
L.
--
http://mail.python.org/mailman/listinfo/python-list
Lad wrote:
I installed PIL under Linux but now when I try it I get the error:
decoder jpeg not available
How can I correct that problem?
if you built PIL yourself, the setup script told you how to fix this.
- make sure you have right libraries installed (see the
prerequisites
Probably the jpeg library - libjpeg is not present on your system.
Search Google for it, then download and install it. Try
http://rpmfind.net also to find it:
http://rpmfind.net/linux/rpm2html/search.php?query=libjpegsubmit=Search+...
But Fredrik's advice is very good - whenever installing a
[EMAIL PROTECTED] wrote:
oops. lost my train of thought. I was gonna say, I wonder if some of
these image manipulation routines are using multiple threads?
PIL doesn't use threading by itself, and I know of quite a few PIL-based
systems running on multi-processor hardware (not to mention
Hi guys,
I've a problem, but very big!
So, i have a python/PIL application that manipulate images ( rotate,
crop, save, etc etc ).
If this application work on a PC mono-processor, I don't have any
problems.
If this application work instead on a PC bi-processor, the process
elaborates an image
If this application work on a PC mono-processor, I don't have any
problems.
If this application work instead on a PC bi-processor, the process
elaborates an image corrupted:
Sounds like you've got some thread synch issue. On a mono-processor
system, your threads are running serially, but on an
OK, this is the code:
image is the object instance of Image class which contains all
informations
pil = Image.open( os.path.join( image.path,image.name ) )
if image.rotation_angle != 2:
try:
pil = pil.rotate(
I wonder if there are other threads accessing image? Maybe image isn't
fully initialized by some other thread before this code accesses it?
It's hard to say what's going wrong. I don't believe that an SMP system
would have any bearing on an application unless it uses multiple
threads of
oops. lost my train of thought. I was gonna say, I wonder if some of
these image manipulation routines are using multiple threads?
--
http://mail.python.org/mailman/listinfo/python-list
27 matches
Mail list logo