Convert does not modify the image in place : it returns a new converted image.
Use newim = origim.convert("RGB")
Kevin
On Jun 30, 2013, at 18:29, Matti Viljamaa wrote:
> I'm trying to handle CMYK images by converting them to RGB. I'm using the
> following cod
large-images.htm
Kevin.
On Sep 8, 2011, at 7:07 AM, Craig Coleman (C) wrote:
> Hi,
>
> I have a really thorny problem.
>
> I need to downsample a raster map that is 23622x23622 pixels to 7874x7874
> pixels using the ANTIALIAS filter.
>
> I have the following Python code:
>
bit of overlap in the files though, or you'll have artifacts where you paste them together. This is due to the resampling errors right at the edge of an image.# Build Image module by Kevin Cazabon
# Version 1.0
# Copyright 1999. kc...@cymbolic.com
print 'Build Image version 1.0 by Kev
On 08/02/11 12:00, image-sig-requ...@python.org wrote:
Send Image-SIG mailing list submissions to
image-sig@python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/image-sig
or, via email, send a message with subject or body 'h
Hello All and Merry Christmas,
I've found a bug and verified it with several of my
Slackware fanatics: it seems that Pil 1.1.7 (python 2.6.4 )
when you do a Image.open('image').show()
ImageShow seems to call every available viewer from _viewers on your
system which on mine and a lot of other
I leave it as a color image, and the params.get simply pulls from a
parameter class where I store my preferences for the darkest and lightest I
want to map to. You can always replace that line with something simple like:
map.append(int(100 + (i * 0.25) + 0.5))
which will map it down to le
Thanks, Oliver. That was the trick.
On 5 July 2010 22:46, Oliver Tonnhofer wrote:
>
> On 02.07.2010, at 06:44, Kevin J. Smith wrote:
> > Here is the code:
> >
> > s3 = S3Connection('blah','blah')
> > bucket = s3.get_bucket('my_bucket
Hi,
I know this may have to do with my use of S3 but I'm searching for any
little thread that I can hang onto to solve this problem.
If I retrieve an image from boto (S3) and then try and open it with PIL I
get an IOError: cannot identify image file.
Here is the code:
s3 = S3Connection('blah','
Thanks for the input everyone - I'll check it out. Hopefully it's
easy to get set up and working.
Kevin.
On 14 Jul 2009, at 13:05, Chris Ps wrote:
-- Forwarded message ------
From: Kevin Cazabon
To: image-sig@python.org
Date: Mon, 13 Jul 2009 23:31:14 -0400
Subje
ll set
of distinct features consistently in similar images (for aligning them
together). I can brute-force this with min/max values/etc, but was
hoping for some help on something more elegant and efficient. Any
pointers would be appreciated, thanks!
Kevin.
_
work-around.
Kevin
On 22 Jun 2009, at 12:52, B. Bogart wrote:
Hello all,
I want to create a very large RGBA image (96000x72000 pixels).
I have 4GB of RAM.
Is there an easy way of getting around this error by having PIL only
allocate one section of the image at a time?
If PIL does not hav
hi guys
i want to generate pencil sketch sort of effect on images with faces in images.
is it possible to do this effect in PIL?
thanks
___
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig
#x27;s harder work on the LittleCMS library
itself.
Kevin.
On 09 Mar 2009, at 13:23, Fredrik Lundh wrote:
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 LittleCM
The jpeg plugin doesn't handle CMYK properly - I've posted patches in
the past... trivial to fix.
Kevin.
On 02 Mar 2009, at 14:04, Charlie Clark wrote:
Am 27.02.2009 um 19:09 schrieb Ask Holme:
Hey list
i have just tried using PIL to crop and resize CMYK images (with
C
rning - look at the C code for resize, for example. We
didn't get it implemented everywhere, but many of the "expensive"
operations are now covered. I'm sure Fred would gladly accept
patches to add support elsewhere.
Kevin.
On 12 Dec 2008, at 11:34, Michael van Telli
look at the C code for resize, for example. We didn't
get it implemented everywhere, but many of the "expensive" operations
are now covered. I'm sure Fred would gladly accept patches to add
support elsewhere.
Kevin.
On 12 Dec 2008, at 11:34, Michael van Telli
never touched the pixel
access sections.
You could look at the resize code in the C module and use the same
method to try it with the functions you use most. The trick is just
figuring out the right places to release and recapture the GIL.
Kevin.
On 06 Aug 2008, at 21:01, Sebastian Haase
s, I don't know.
Kevin.
# PILusm.py
# by Kevin Cazabon ([EMAIL PROTECTED], [EMAIL PROTECTED])
# copyright 2003
#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Lesser General Public
#License as published by the Free Softwar
nter justified, just offset by half that (38 or 39
pixels).
Kevin.
On 26 Nov 2007, at 05:15, Scott Frankel wrote:
>
> I'm using PIL to render text. Is there a way to specify left,
> center, or right justification?
>
> After setting X and Y coordinate positions, the text
library
if he sees fit, for which I'll gladly remove ANY licensing restrictions)
Kevin.
- Original Message -
From: "Travis Oliphant" <[EMAIL PROTECTED]>
To:
Cc: "numpy-discussion"
Sent: Tuesday, July 11, 2006 9:37 PM
Subject: Re: [Image-SIG] Quicker
n 99.99% of the time, but occasionally crashes with an access violation
error, pointing to the Tk DLL.
So - until Tk is thread-safe (I'm not holding my breath, it wouldn't be a
trivial task), just use the same thread that creates the Tk widgets to
convert your image
Thanks for the detailed work testing, Cesare! It sounds like you've
verified the input and output fixes successfully with multiple programs.
On a side note, I appreciate the credit on your web page, but "the great
Kevin Cazabon" reference is certainly un-justified. :) The patc
work with CMYK, it's not something the home user usually deals with.
THanks for trying though,
Kevin.
- Original Message -
From: "Steve Holden" <[EMAIL PROTECTED]>
To: "Cesare Leonardi" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, April 18, 2006 12:01 AM
S
check with? Maybe
Corel Draw or something?
Kevin.
- Original Message -
From: "Fredrik Lundh" <[EMAIL PROTECTED]>
To:
Sent: Monday, April 17, 2006 8:32 PM
Subject: Re: [Image-SIG] Problem with JPEG and CMYK color space
> Cesare Leonardi wrote:
>
>> No on
elegant an efficient ways of fixing this problem,
but this works. I hope it helps you, as I've had the same issues myself.
Fredrik - if you're ok with the crude methods of fixing this problem, can
you include it in future builds? Thanks.
Kevin.
- Original Message -
From: &l
right place to re-invert the image upon load, but
I'll see what I can find. Anyone with suggestions would be welcome.
There's probably a better way to do this though, so the data is read
correctly in the first place (in CMYK, 0,0,0,0 = white, 255,255,255,255 =
full black... th
invert patch).
I'll see if I can spend some time looking at that this weekend.
Kevin.
- Original Message -
From: "Cesare Leonardi" <[EMAIL PROTECTED]>
To:
Sent: Friday, April 14, 2006 9:38 AM
Subject: Re: [Image-SIG] Problem with JPEG and CMYK color space
> [EMA
When saving a CMYK file to JPG, PIL seems to invert the colors. I've
submitted a patch to Fredrik already for this, and it should be in the next
major build.
Adding a simple invert to the image before saving will help.
Kevin.
- Original Message -
From: "abel deurin
od)
else:
#set to maxHeight*imAspect x maxHeight
return image.resize((int((float(maxSize[1])*imAspect) + 0.5),
maxSize[1]), method)
Kevin.
- Original Message -
From: "Count László de Almásy" <[EMAIL PROTECTED]>
To: "Chris Cogdon" <[EMAIL P
You can use PyCMS directly in your program if you like, or simply refer to
my code to see how I'm using LittleCMS. You can find PyCMS at:
http://www.cazabon.com/pyCMS
Kevin Cazabon
- Original Message -
From: "Tobias Hilbricht" <[EMAIL PROTECTED]>
To:
Sent: Wednesd
Sorry, stupid typo in sizeToMax in the one I sent previously. Sorry for the
attachments.
Kevin.
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Nand Rathi" <[EMAIL PROTECTED]>; "python_ImageSig"
Sent: Sunday, December 04, 2005 2:00 PM
Subject: Re
This question seems to come up regularly - so here's a quick and dirty class
that should work for displaying in Tkinter (cross-platform, although I've
only tested on Windows).
Kevin.
- Original Message -
From: "Nand Rathi" <[EMAIL PROTECTED]>
To: "p
hange the image
Kevin.
- Original Message -
From: "Nand Rathi" <[EMAIL PROTECTED]>
To: "python_ImageSig"
Sent: Saturday, December 03, 2005 2:47 PM
Subject: [Image-SIG] Please,I need help regarding displaying a PIL image in
realtime...
Hello All
I am new to PIL s
You can always try my ImagePrintWin module for printing - it should be
pretty easy to use, and has everything down to a printer setup GUI including
print preview. Documentation is in the code, including the test at the very
bottom.
http://www.cazabon.com/python/downloads/ImagePrintWin.py
Kevin
(either as a code reference or for use in your program - I've used it
successfully with older Python and PIL versions).
Kevin.
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Sunday, November 27, 2005 10:54 PM
Subject: [Image-SIG] (no subject)
> Hi all,
>
> I
make sure to include the PNG image module maybe? ImageFont font files for
PIL are PNG format.
Kevin.
- Original Message -
From: "Chris Jerdonek" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, November 16, 2005 8:50 PM
Subject: [Image-SIG] PIL and py2app
> Does anyone
into the final image, using the text image as a mask.
(i.e. final = original.paste(colorImage, (x, y), textMask)
Resizing using BICUBIC will give the text anti-aliased edges as desired.
Kevin.
- Original Message -
From: "Laszlo Zsolt Nagy" <[EMAIL PROTECTED]>
To:
Sent:
bly defaults to 300 pixels/inch or
something, while the others default to 72.
I'm not sure how you change the rendering res in PILfor EPS imports - but I
almost guarantee that's where you need to look.
Kevin.
- Original Message -
From: "Stefano Masini" <[EMAIL PROTE
Search the image-sig archives for the .tile attribute - you can do what you
need with that. Fredrik has posted a number of replies helping people with
it in the past.
Kevin.
- Original Message -
From: "august" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, September 07, 2005
ving (it's
supported now).
Kevin.
- Original Message -
From:
Tim Ake
To: image-sig@python.org
Sent: Monday, June 27, 2005 11:31
PM
Subject: [Image-SIG] PIL 1.1.5 - Loss of
resolution
Hi,
I am using PIL 1.1.5 with Python 2.4,
and am seeing a loss of
p.cfg file for py2exe.
Kevin.
- Original Message -
From:
Sean Curtis
To: image-sig@python.org
Sent: Tuesday, August 16, 2005 4:49
PM
Subject: [Image-SIG] PIL and py2exe
the initialization of PIL does two things that
are banging heads with py2exe:
=window.tkIm)
window.label.pack()
return window
x = show2("c:\\temp\test.tif")
x.mainloop()
-
(I make the label and tkIm as attributes of the window class, so that a
reference is held... otherwise garbage collection makes them go away)
Kevin.
- Original Message -
pyCMS that uses the littleCMS library to do
ICC conversions. See: http://www.cazabon.com/pyCMS
Kevin.
- Original Message -
From: "marc birot" <[EMAIL PROTECTED]>
To:
Sent: Friday, June 17, 2005 6:01 AM
Subject: [Image-SIG] Converting CMYK JPG image to RGB
> Hello,
http://www.gnu.org/software/ghostscript/ghostscript.html
Kevin
- Original Message -
From: "Franz Struwig" <[EMAIL PROTECTED]>
To:
Sent: Thursday, June 09, 2005 2:20 PM
Subject: [Image-SIG] PDF to Image conversion
> Greetings,
>
> Does anyone know of an elegant met
Thanks Markus - I skipped over that one due to the description... but you're
correct that it's what I want.
(the description says it's for adjusting the color balance of an image...
not really an accurate description)
Kevin.
- Original Message -
From: <[EMAIL PROTE
lcome, thanks!
Kevin.
___
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig
ou're interested in
incorporating the usm / gausian blur, or even pyCMS into the standard
library. However it sounds like you're hands are full these days too! (My
little one has limited my spare time significantly, otherwise I'd just send
you diffs)
Kevin.
- Original Message ---
. Unfortunately I could never catch
the actual error message.
I solved the problem by caching the font instead of reloading it each time,
but I'm really not sure why it would have problems being loaded
successively.
It's not an issue for me - just thought I'd let y
re if it's a problem anyone else has
seen before.
Thanks
Kevin.
___
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig
49 matches
Mail list logo