Permanent Links


What should be the topic for the next Impossibly Stupid poll?

A Town Square Poll Space

Tech Corner

See Also

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]README.html2016-11-01 13:58 2.1K 
[DIR]images/2016-07-04 16:46 -  
[   ]info.json2016-07-04 18:42 35  
[   ]tags=meta2015-03-26 18:31 0  
[   ]tags=play2015-03-26 18:30 0  

Declaration of Resolution Independence

When this site was rebranded, I distilled out an icon from the JPEGs that Neil provided:

jpg-sourced icon

As you can see, enlarging it makes for a pixelated mess. Some (including the likes of Apple for web and app images), think the solution to this problem is to use multiple images in every resolution possible. I naturally think that's dumb.

The proper way would be to use resolution-independent image formats when possible. The increasingly-supported way of doing that these days is with SVG. As a techie with very little in the way of artistic skills, one thing that I particularly like about SVG is that it's pretty easy to generate both manually and programmatically (e.g., see the splash gallery here). So I recently decided to give the Impossibly Stupid icon an SVG makeover:

svg icon

If you look at the source code to the image, you can see how simple it is. I just take a line with rounded ends and repeat it three times. The whole file is only 716 bytes, and it looks great at every resolution! In comparison, the old icon was a whopping 11583 bytes (over 16x larger) for just the 96x96 version. To be fair, though, some of that was due to JPEG artifacts; a new PNG I generated from the SVG icon came in at roughly 2x as large at 1595 bytes. Still, all things considered, I'd prefer to have a single, tiny file that looks great at all sizes.