XfceIconTheme png/svg preference

Brian J. Tarricone bjt23 at cornell.edu
Sat Nov 6 08:26:20 CET 2004


hey all,

i'm finally getting around to fixing some XfceIconTheme problems, and i'm
setting it up to properly prefer correctly-sized non-svg files over .svg
files, since .svg files can take a bit longer to parse.

it's basically done, except for one thing i can't decide on.  say we have
a 48x48 .png icon and an .svg icon.  we want a 16x16 icon.  do we rescale
the .png down to 16x16, or return the .svg?  the questions are:

1) will downscaling the .png using bilinear interpolation give us a crappier
image than the rendered .svg?
2) will downscaling the .png take enough time that the savings over parsing
the .svg are insignificant?

and also, i haven't yet decided: which of those questions is more important?
personally, i think quality should trump performance, but that may not be
in line with xfce's philosophy, especially if the quality loss is very low.

my current code always takes the .svg if it can't find a perfect .png match,
since that's what was easiest to find conditions for first, but it could
be changed.  another thing to consider is that allowing .png files to be
downscaled results in a slightly more complex if() expression, which has
to be traversed quite a bit.

i dunno.  it may not even really matter either way, but i thought i'd ask
in case anyone had a compelling answer.

	-b



More information about the Xfce4-dev mailing list