Andy McCurdy wrote:
Just started using PIL. I'm attempting to resize a .gif image to a
smaller size, keeping the height/width proportional. The resize
works, but the resulting image is very grainy.
try converting the image to RGB first, and use resize(ANTIALIAS) on
the RGB image before
I forgot to take of the _t function, so the first lines should be:
CROSS = 'Cross'
ROUNDED = 'Rounded'
SQUARE = 'Square'
Stani schreef:
In PIL this is easy.
The following code preferably uses cache (just a simple python
dictionary) to avoid
In PIL this is easy.
The following code preferably uses cache (just a simple python
dictionary) to avoid the overhead of generating the same transparency
masks. So typical use would be:
cache = {}
for image in images:
thumbnail = image_round(image.thumbnail(size, filter), cache, radius)
Hi all,
Just started using PIL. I'm attempting to resize a .gif image to a smaller
size, keeping the height/width proportional. The resize works, but the
resulting image is very grainy. Resizing the same image with ImageMagick's
convert utility produced a far better quality image. I'd rather
Varsha purohit wrote:
In my program i have a gui where i am showing an image on the
panel. I want to implement zoom in and zoom out functions using wxpython
and PIL. I am tryin to find in PIL if there is any functionality like that.
the transpose(EXTENT) method is often used for
Fredrik, thanks for the reply. I am in fact converting to RGB
first... at least I think so. Here's the code I'm using that produces
bad results:
from PIL import Image
# io is a file handle
pil_image = Image.open(io)
# convert to rgb
pil_image = pil_image.convert('RGB')
# new_width/new_height
hi Andy
Here's the resized gif with the original code I pasted. You'll see a
bunch of 'dots' throughout the image:
http://www.andymccurdy.com/resized_1.gif
PIL uses the so-called web palette by default. Your image uses
#fdfdfd for white, but the web palette uses #ff. So it dithers to
Hey Douglas,
I interpreted your response as a setting to change to make this
specific image resize better. I'm using PIL to resize images that
users upload to my website. Since I don't have control over the
media, I need generic settings that will be good for all users. What
settings would you
Andy McCurdy [EMAIL PROTECTED] wrote:
I interpreted your response as a setting to change to make this
specific image resize better. I'm using PIL to resize images that
users upload to my website. Since I don't have control over the
media, I need generic settings that will be good for all
Thanks Douglas. Just tested it out, and the quality has improved
dramatically on all GIF images I threw at it.
On Jan 9, 2008 3:34 PM, douglas bagnall [EMAIL PROTECTED] wrote:
Andy McCurdy [EMAIL PROTECTED] wrote:
I interpreted your response as a setting to change to make this
specific
10 matches
Mail list logo