Comment 0 for bug 947660

Camilo Martin (herzschaltung) wrote :

I normally use inkscape to create icons in small sizes, and anti-aliasing is a very important part of making them look good. Normally, the "export as bitmap" tool does a poor job, and I have to fix it up in a bitmap program (commonly GIMP or Photoshop).

I will show here an example with both the bug (as I see it) and how I fix it manually.

These are SVGs, they are three sizes of an icon of a small open-source program I'm making in my spare time:
http://msile.googlecode.com/svn/trunk/Graphics/Icons/msile/msile-16px.svg
http://msile.googlecode.com/svn/trunk/Graphics/Icons/msile/msile-32px.svg
http://msile.googlecode.com/svn/trunk/Graphics/Icons/msile/msile-48px.svg

They have 1px black strokes and 1px inner strokes of a light shade: this kind of thing creates even more aliasing, but helps achieve a crisp look if anti-aliasing is very good. It's recommended to use this trick in the Tango icon theme guidelines (http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines) and I personally like how it looks (again, when properly anti-aliased).

Now, this is what happens if we just "export as bitmap":
http://i.imgur.com/SSYXM.png

As you can see, the anti-aliasing is very poor. So what this makes me do to fix it, manually? Simple: I just export in 1440 DPI, open in GIMP or Photoshop, and resize down to the correct size with either bicubic or Lanczos/Bicubic sharper. This is the result:
http://i.imgur.com/lIrfH.png

As you can see, it's much better.
In my very old machine (1 core @1.6GHz, 768 RAM) it takes an insignificant amount of time for a 48px icon, and I wouldn't mind it taking exponentially more for larger images. I took waaay more than a minute to make an icon, why not wait a bit for a better result? At least I'd like a checkbox somewhere that toggles a slower but higher quality algorithm that anti-aliases properly.

Also, it's not just because these are icons that I notice this kind of artifact; my girlfriend uses Inkscape to draw anime (http://hyanna-natsu.deviantart.com/), and she too sees a considerable difference in aliasing between just exporting as bitmap versus using the technique above, in drawings which are not icons and are much more free-hand.

Thank you for your time reading this, I hope you consider this suggestion. Inkscape is a very valuable program for me and others.