Drawing small icons

Post questions on how to use or achieve an effect in Inkscape.
Uktrunie
Posts: 154
Joined: Sun Jul 18, 2010 4:48 am

Drawing small icons

Postby Uktrunie » Sat Nov 23, 2013 1:22 am

So I run into an issue. I'm writing an app and I needed some small toolbar icons, 16x16 px so really small.

Now, I have two problems:

a) What looks like a 1px width crisp line in Inkscape becomes blurred in the final PNG.
b) Looking at some icon sets like Tango (16x16 sizes) or Famfamfam Silk I noticed that they make their borders crisp. Like with less anti-aliasing. This is specially useful as it makes the icon stand a lot more when on the toolbar.

So, any idea? Tips?

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Drawing small icons

Postby v1nce » Sat Nov 23, 2013 1:45 am

svg sucks at drawing little icons :
When you draw a line at x=10 with a width of 2, everything is fine : it draws one pixel at 9 and another at 10
=> crisp line

With a width of 1, it draws 50% of the pixel at 9 and 50% at the pixel at 10
=> your line looks blurry

This behaviour could be fine for cartographer but that's not what icon designer would like and is inconsistent with what ahhpens in html.
Next version of svg should adress this problem (you would be able to choose if the border is into or outside or 50%in/outside)

before it happens you could try the following extension that will offset the coordinates of your point so that a 1px border fits into a pixel
http://code.google.com/p/pixelsnap/

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing small icons

Postby Lazur » Sat Nov 23, 2013 1:58 am

A tip: export to a larger png and resize it in gimp.
There you can choose interpolation methods, some may have a better result.
After scaling down, sharpen the colours a bit.

If you have a detailed design as an svg, maybe simplify it before exporting as well.
Small details would only turn to a bunch of blurred pixels.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Drawing small icons

Postby microUgly » Sat Nov 23, 2013 7:32 am

The method I use to create crisp icons is described at viewtopic.php?f=6&t=33

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Drawing small icons

Postby Grobe » Sun Nov 24, 2013 2:51 am

Here is two key settings that should be set for best possible result:
1. Grid offset = 0.1 px, both for X-axis and Y-axis.
2. Export DPI = 90. This ensures that the dimension for the exported file matches the canvas.
:lol:

Uktrunie
Posts: 154
Joined: Sun Jul 18, 2010 4:48 am

Re: Drawing small icons

Postby Uktrunie » Sun Nov 24, 2013 4:15 am

Aha! All fine answers, people.

I knew about the method MicroUgly posted, the problem with that is that you have to "draw pixels" instead of objects and I'm not good with that. :)


Return to “Help with using Inkscape”