Page 1 of 1

Anti-aliasing

Posted: 2009-06-08T03:31:14-07:00
by Carlos82
Is it activated by default in this command?
convert im_lanczos.bmp -unsharp 1.0×1.0+0.5+0.0 im_lanczos_sharp.bmp

If not, how to activate it?

Thanks.

Re: Anti-aliasing

Posted: 2009-06-08T04:18:44-07:00
by anthony
I am not quite certain how anti-aliasing relates to unsharp? They are VERY separate things, except for the fact they deal with edge effects.

The anti-aliasing settings in IM are basically used to avoid creating the extra 'mixed' colors along the edges of things like text, and drawn objects like lines and circles. Such mixed colors make the objects and text look smoother at low resolution (density) displays where the effects of a individual pixel can be highly visible.

Unsharp is completely unrelated to drawing, and thus anti-aliasing. It processes an existing image to try to make the edges of sharp color changes more pronounced and less blurred that other operations like resizing, JPEG compression or document scanning can produce.

As a operation it will completely ignore any anti-aliasing setting as such settings have no bearing on it.
The same goes for blur, resize, or another other full image processing operation.

Re: Anti-aliasing

Posted: 2009-06-08T06:31:35-07:00
by Carlos82
Sorry I wanted to type to this command:
convert im.bmp -resize 100x im_lanczos.bmp

But, if anti-aliasing is not related to resize operation, then, ¿why in this article it is said the text below?
The image above was downsampled with ImageMagick Version 6.0.1, with Lanczos filtering and anti-aliasing selected.
From: http://www.xs4all.nl/~bvdwolf/main/foto ... ample1.htm

Re: Anti-aliasing

Posted: 2009-06-08T11:15:18-07:00
by fmw42
Read all the details about -resize at http://www.imagemagick.org/Usage/resize/#resize especially the bottom half of the page about artifacts, filters and expert settings. Antialiasing depends upon the filter choice: to disable all antialiasing when shrinking images use -filter point

Re: Anti-aliasing

Posted: 2009-06-08T14:21:13-07:00
by Carlos82
Ok. So then my quoted sentence is non-sense since the antialias operator does not have any effect on -filter Lanczos, right?

Re: Anti-aliasing

Posted: 2009-06-08T15:54:25-07:00
by fmw42
As far as I know +antialias works with text drawing not with -resize. see http://www.imagemagick.org/Usage/draw/#settings

Re: Anti-aliasing

Posted: 2009-06-08T17:09:47-07:00
by anthony
Again anti-aliasing is a setting for drawing things like text and lines. Nothing to do with resizing.

However Resize is designed to merge image colors together so as to produce a better result, which can be mis-interpreted as being 'anti-aliasing', as it has similar effects. "Filters" (and "Interpolator") define the method used to determine HOW the colors should be merged to produce the color mixing.

If you do not want color mixing, then either use -sample instead of -resize or set -filter point before resizing. The sample operator does this without all the extra code the resize operator has for using resize filters, making it much faster.

Prehaps if you like to explain WHY you are interested in this we can help you further!


But, if anti-aliasing is not related to resize operation, then, ¿why in this article it is said the text below?
The image above was downsampled with ImageMagick Version 6.0.1, with Lanczos filtering and anti-aliasing selected.
From: http://www.xs4all.nl/~bvdwolf/main/foto ... ample1.htm
The person that wrote this was a user of various image processing packages, but did not truely understand the what 'Lanscoz' or other image filters ment. If he did he would have understood why the aliasing effects become reduced for either 'Gaussian' or 'Windowed Sinc' type resize functions. The former is typically classed as blurry but without 'aliasing' effects. The later which 'lanscoz' is but one type, is a properly signal re-sampling filter, though again some people still find it a little 'blurry'.

Note that this is to stop 'aliasing' artefacts appearing in resized images, it is NOT 'anti-aliasing'.