← Back to team overview

ubuntu-appstore-developers team mailing list archive

Re: Minimizing icon and screenshot transfer size

 

On Tue, Apr 22, 2014 at 11:05 AM, Michał Sawicz
<michal.sawicz@xxxxxxxxxxxxx> wrote:
> On 22.04.2014 15:54, Rodney Dawes wrote:
>> What about automatically running pngcrush on all uploaded PNGs? In some
>> cases, this might reduce the image size quite a bit. Do we support SVG
>> as a format for the icon on the server? An SVG compressed with gzip -9,
>> with the file extension of .svgz should be loadable by Qt already, and
>> should be a very significant reduction in file size of the image.
>> Supporting and encouraging the SVG path is probably something we should
>> do anyway.
>
> Even when you do SVG, you often want to reduce detail on lower
> resolution screens, so even with vectors we need to support multiple
> (even if less variations) sizes.
>
> What's more, we should check, but my feeling is that rendering an SVG is
> more costly than loading a PNG. Not something we should disregard -
> maybe the cache could cache the rendered bitmap. Unfortunately then Qt
> doesn't render all SVGs correctly, two examples being the web browser
> and gallery icons, which you can actually see in the image currently.
> Work on this would be needed if we wanted Qt to render them.

There's some recent GPU acceleration of SVG rendering in Chrome, but I
think we are far from using such a thing for our icons, so indeed
rendering SVG will be more cpu costly than the simple deflate
algorithm that PNG uses.

But there's a bigger issue when rendering SVG, and that is the varying
support of SVG extensions like filters effects in different renderers
(eg the qt renderer and the browser renderer). A designer using, say,
Illustrator would be surprised when the icon rendered on a device does
not look "just right".
I believe that's the reason why only raster files are used for the
icons of every other major platform:
http://www.visualpharm.com/articles/icon_sizes.html

cheers,
-- 
alecu


Follow ups

References