[Image-SIG] antialiasing in pil -2

Kees van Drongelen / VisualSpace kees@visualspace.nl
Mon, 14 May 2001 10:53:18 +0200


Thanks Kevin,

It works for filled objects. With outlined objects the line of 1 
pixel is too thin. Do you know how-to manipulate the outline 
thickness?

anyway thanks for your comment.

Kees van Drongelen.

#

dxy=100
antialiasing=1
scale=4

if antialiasing:
	im=im.resize((dxy[0]*scale, dxy[1]*scale), Image.NEAREST)
	im=im.resize((dxy), Image.BICUBIC)

#

>"Anti-Aliasing" by definition is performed by rendering at a higher
>resolution and downsampling using interpolation.  I'm not sure if PIL can
>automatically do this for you, but it's not hard to do yourself:
>
>-render at 2x, 3x, 4x, or higher resolution than you need
>-downsample the image using "bicubic" to the real size
>
>In other programs, you'll see the "Anti-aliasing" selection of "2x2, 3x3,
>4x4", etc, and that's bascially the "oversampling" you're setting above.
>
>Hope it helps...
>
>Kevin Cazabon
>


-- 
||||||||||||||||||||||||||||||||||||
VisualSpace
grafische en interactieve vormgeving

Krelagestraat 34
2012 CT Haarlem
T 023 532 33 66
F 023 532 33 04
http://www.visualspace.nl
||||||||||||||||||||||||||||||||||||