Laszlo Zsolt Nagy
2004-12-02 11:03:57 UTC
Hi all,
I have a little problem with PIL. I need to display images in a
browser (thumbnails) (this is the selector window).
I also need the original version of the image to be displayed in a
Java applet.
One example:
thumbnail: Loading Image...
original: Loading Image...
I made the thumbnail from the original image using PIL this way:
im = Image.open(fullpath)
try:
im.thumbnail(THUMBSIZE,Image.ANTIALIAS)
im.save(thumbpath)
finally:
del im
If I do not use ANTIALIAS, then I get this:
Loading Image...
With the ANTIALIAS-ed version, the problem is that you cannot see the
lines - they are very light gray, almost invisible. I have many cliparts
with thin lines. However, I also have many cliparts like this:
Loading Image...
I tried to posterize or darken the images but I could not find a good
solution. (I also tried to count the number of colors in the image and
use this info.) Can you suggest an image filter and/or method that creates
darker black lines from the original thin lines? Also it would be
great to have it working with those colorful smudged images. It will
be terribly slow to separate them by hand. There are almost 15000 of
them...
I have a little problem with PIL. I need to display images in a
browser (thumbnails) (this is the selector window).
I also need the original version of the image to be displayed in a
Java applet.
One example:
thumbnail: Loading Image...
original: Loading Image...
I made the thumbnail from the original image using PIL this way:
im = Image.open(fullpath)
try:
im.thumbnail(THUMBSIZE,Image.ANTIALIAS)
im.save(thumbpath)
finally:
del im
If I do not use ANTIALIAS, then I get this:
Loading Image...
With the ANTIALIAS-ed version, the problem is that you cannot see the
lines - they are very light gray, almost invisible. I have many cliparts
with thin lines. However, I also have many cliparts like this:
Loading Image...
I tried to posterize or darken the images but I could not find a good
solution. (I also tried to count the number of colors in the image and
use this info.) Can you suggest an image filter and/or method that creates
darker black lines from the original thin lines? Also it would be
great to have it working with those colorful smudged images. It will
be terribly slow to separate them by hand. There are almost 15000 of
them...
--
Thanks,
Laszlo
mailto:***@geochemsource.com
web: http://designasign.biz
Thanks,
Laszlo
mailto:***@geochemsource.com
web: http://designasign.biz