Gimp-Forum.net
Anti-Alias Functionality - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Anti-Alias Functionality (/Thread-Anti-Alias-Functionality)



Anti-Alias Functionality - rickk - 10-29-2022

At the core of this question is curiosity why the anti-alias function for lines drawn with gimp, is so much more robust than the anti-alias function available via Filters>Enhance>Anti-alias.....just didn't want that to get lost in the following details. Smile

In the following sketch (magnified 8X)  are two pairs of lines. The black lines are drawn by stroking two paths, each in line mode, with anti-aliasing enabled. The pairs of black lines are identical in both the "before" as well as "after" frames.


The blue lines, drawn for comparison, in the "before" frame ...the same two paths are stroked, but with anti-aliasing disabled. Then in the "after" frame,  anti-aliasing has been added via the Filters>Enhance>AA function.

Notice the difference in the broad range of transparency used on the straight black line, compared to it's blue counterpart. Same for the curved parts of the other line.

AM I NOT doing something properly, or is there just this much difference in the way Gimp delivers anti-aliasing? (filter vs built in functionality)   FWIW, drawing with a pen seems to likewise offer superior AA, compared to that provided by the enhance filter, 


Additional curiosity, but the enhance filter (Anti-Alias) seems to only work for me when the target line is drawn on a  solid background. If/when the target line is drawn on an otherwise transparent layer, then the Enhance>Anti-Alias function seems to contribute nothing to the line.

Thanks in advance for your thoughts

[Image: XXPHqtT.gif]

P.S.
What might appear to be the obvious solution, just saying "draw the lines with anti-aliasing, if that's the way you want them", really doesn't work for the project I am on. What I'm doing is trying to extract select details from a published map, via the fuzzy select tool, and then smooth out the extracted data with the anti-alias filter


RE: Anti-Alias Functionality - tmanni - 10-29-2022

The quality of the 2 methods can be simply explained :

Filter > Enhance > Antialias is an old post-processing filter to do "pseudo-antialiasing effect on hard-edged source material" (comment taken from the source code of the gegl filter).
It takes the input grid pixels and try to detect sharp edges and smooth them.

Stroking a path with anti aliasing is a different method : starting from a mathematical object (a vector),  a 'vector to raster' algorithm is performed to represent the path on a grid of pixels.

The second method will always gives precise, clean and accurate result (thanks to mathematics and subpixels precision).
The first method will gives... hum... bad to almost good result, depending of the algorithm implied (yeah, the Scale3x edge-extrapolation used in gimp/gegl is clearly bad).


RE: Anti-Alias Functionality - rickk - 10-30-2022

Thanks for an explanation that makes sense!! It seems a shame that the post-processing filter method does not allow the user to "grow" the sample range to be anti-aliased. similar to how one can grow or shrink a selection.

Thanks though, at least now I know that its not a result of me not knowing....etc.