Re: [Image-SIG] Converting from "CMYK" to "RGB"

2013-07-05 Thread Kevin Cazabon
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

Re: [Image-SIG] What is the best way to anti-alias a very large resolution image in PIL

2011-09-14 Thread Kevin Cazabon
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: >

Re: [Image-SIG] What is the best way to anti-alias a very large resolution image in PIL

2011-09-14 Thread Kevin Cazabon
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

Re: [Image-SIG] Image-SIG Digest, Vol 94, Issue 2

2011-02-09 Thread Kevin Paulus
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

[Image-SIG] bug in version 1.1.7

2010-12-25 Thread Kevin Paulus
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

Re: [Image-SIG] Create a 'disabled' image effect (similar to how Windows shows disabled images)

2010-12-01 Thread Kevin Cazabon
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

Re: [Image-SIG] Can't open image retrieved from S3 with PIL

2010-07-06 Thread Kevin J. Smith
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&#

[Image-SIG] Can't open image retrieved from S3 with PIL

2010-07-05 Thread Kevin J. Smith
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','

Re: [Image-SIG] feature detection/location in images

2009-07-23 Thread Kevin Cazabon
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

[Image-SIG] feature detection/location in images

2009-07-13 Thread Kevin Cazabon
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. _

Re: [Image-SIG] Workarounds for MemoryErrors

2009-06-22 Thread Kevin Cazabon
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

[Image-SIG] pencil sketches

2009-04-22 Thread Kevin Castiglione
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

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

2009-03-09 Thread Kevin Cazabon
#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

Re: [Image-SIG] playing with CMYK images

2009-03-02 Thread Kevin Cazabon
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

[Image-SIG] Fwd: PIL 1.1.6 and convert cmyk jpegs to rgb and writing png files

2008-12-12 Thread Kevin Cazabon
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

Re: [Image-SIG] PIL 1.1.6 and convert cmyk jpegs to rgb and writing png files

2008-12-12 Thread Kevin Cazabon
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

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

2008-08-06 Thread Kevin Cazabon
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

Re: [Image-SIG] Unsharp mask?

2008-05-16 Thread Kevin Cazabon
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

Re: [Image-SIG] text justification

2007-11-26 Thread Kevin Cazabon
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

Re: [Image-SIG] Quicker image transfer, tobuffer?

2006-07-11 Thread kevin
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

[Image-SIG] ImageTk and threading - warning

2006-06-19 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-19 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-17 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-17 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-16 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-15 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-15 Thread kevin
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

Re: [Image-SIG] Problem with JPEG and CMYK color space

2006-04-13 Thread kevin
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

Re: [Image-SIG] PIL resize with aspect ratio?

2006-01-05 Thread kevin
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

Re: [Image-SIG] How to pass an image from python as C/C++ pointer

2005-12-14 Thread kevin
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

Re: [Image-SIG] Please, I need help regarding displaying a PIL image in realtime...

2005-12-04 Thread kevin
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

Re: [Image-SIG] Please, I need help regarding displaying a PIL image in realtime...

2005-12-04 Thread kevin
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

Re: [Image-SIG] Please, I need help regarding displaying a PIL image in realtime...

2005-12-03 Thread kevin
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

Re: [Image-SIG] (no subject)

2005-11-28 Thread kevin
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

Re: [Image-SIG] (no subject)

2005-11-27 Thread 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

Re: [Image-SIG] PIL and py2app

2005-11-16 Thread kevin
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

Re: [Image-SIG] Bad antialias? (in Python Imaging Library 1.1.5)

2005-09-19 Thread kevin
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:

Re: [Image-SIG] Correctly determine image size of a Photoshop EPS

2005-09-19 Thread kevin
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

Re: [Image-SIG] copy pixels from one image to another

2005-09-10 Thread kevin
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

Re: [Image-SIG] PIL 1.1.5 - Loss of resolution

2005-08-31 Thread kevin
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

Re: [Image-SIG] PIL and py2exe

2005-08-31 Thread kevin
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:  

Re: [Image-SIG] Something other than .show()

2005-07-02 Thread kevin
=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 -

Re: [Image-SIG] Converting CMYK JPG image to RGB

2005-06-17 Thread kevin
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,

Re: [Image-SIG] PDF to Image conversion

2005-06-09 Thread kevin
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

Re: [Image-SIG] Saturation function?

2005-04-06 Thread kevin
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

[Image-SIG] Saturation function?

2005-04-06 Thread kevin
lcome, thanks! Kevin. ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig

Re: [Image-SIG] RGB conversion to CMKY gives strange results

2005-03-10 Thread kevin
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 ---

[Image-SIG] ImageFont - loading issue (bug)

2005-03-08 Thread kevin
. 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

[Image-SIG] Problems with TIFFs from Corel Draw?

2005-01-10 Thread kevin
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