FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Development

 
 
LinkBack Thread Tools
 
Old 02-09-2008, 02:36 PM
Ioannis Nousias
 
Default Use SVG icons instead of PNG

I'm sure this has been asked before.

Most of the system application launchers use PNG icons. For example,
Firefox and Thunderbird (two of the most commonly used apps). Very few
use SVG, like gnome-terminal. I like to have few icons on my desktops
that are stretch to ~x2 their size. PNGs look aliased when stretched.

Another case where the fixed resolution of PNGs gets in the way, is in
things like cairo-dock, where the application's icon in 'window list'
looks aliased.

The obvious question is, why use PNGs and not SVG for all icons?
Performance?
Also, is that theme related ? I use the 'human' theme.

regards,
Ioannis


PS: I've modified 'firefox.desktop' in '/usr/share/applications', just
to make sure that the default uses SVG. This works well for my desktop
icons, however, things like cairo-dock keep displaying a PNG icon of the
running firefox app. Is there something else I need to change, or is
this Cairo-Dock's fault ?


--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 05:15 PM
"Mackenzie Morgan"
 
Default Use SVG icons instead of PNG

One intention for Hardy, at least from what I read before (correct me if it's changed) was to use SVGs for everything, so I'm guessing things are changing over bit by bit.* Many of the apps have a png and an svg version available though.


On Feb 9, 2008 10:36 AM, Ioannis Nousias <s0238762@sms.ed.ac.uk> wrote:

I'm sure this has been asked before.

Most of the system application launchers use PNG icons. For example,
Firefox and Thunderbird (two of the most commonly used apps). Very few
use SVG, like gnome-terminal. *I like to have few icons on my desktops

that are stretch to ~x2 their size. PNGs look aliased when stretched.

Another case where the fixed resolution of PNGs gets in the way, is in
things like cairo-dock, where the application's icon in 'window list'

looks aliased.

The obvious question is, why use PNGs and not SVG for all icons?
Performance?
Also, is that theme related ? I use the 'human' theme.

regards,
Ioannis


PS: I've modified 'firefox.desktop' in '/usr/share/applications', just

to make sure that the default uses SVG. This works well for my desktop
icons, however, things like cairo-dock keep displaying a PNG icon of the
running firefox app. Is there something else I need to change, or is

this Cairo-Dock's fault ?


--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss



--
Mackenzie Morgan
Linux User #432169
ACM Member #3445683
http://ubuntulinuxtipstricks.blogspot.com <-my blog of Ubuntu stuff

apt-get moo
--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 05:27 PM
Milan
 
Default Use SVG icons instead of PNG

Ioannis Nousias a écrit :
> I'm sure this has been asked before.
>
> Most of the system application launchers use PNG icons. For example,
> Firefox and Thunderbird (two of the most commonly used apps). Very few
> use SVG, like gnome-terminal. I like to have few icons on my desktops
> that are stretch to ~x2 their size. PNGs look aliased when stretched.
>
> Another case where the fixed resolution of PNGs gets in the way, is in
> things like cairo-dock, where the application's icon in 'window list'
> looks aliased.
>
> The obvious question is, why use PNGs and not SVG for all icons?
> Performance?
> Also, is that theme related ? I use the 'human' theme.
>
SVG icons have to be generated and present in the "scalable" subdirs of
your theme, or of the fallback theme ("hicolor"). Most apps already have
SVG icons, maybe some don't install them.
As for the performance side, several PNG icons are generated, one for
each common size so the system doesn't need to use the SVG version. SVG
is only used when really needed (i.e. for sizes superior to 22x22 or 48x48).

All this is developed in the freedesktop.org specification for icon
themes that you can read here:
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
> regards,
> Ioannis
>
>
> PS: I've modified 'firefox.desktop' in '/usr/share/applications', just
> to make sure that the default uses SVG. This works well for my desktop
> icons, however, things like cairo-dock keep displaying a PNG icon of the
> running firefox app. Is there something else I need to change, or is
> this Cairo-Dock's fault ?
>
Ideally, .desktop file should not use .png or .svg extensions, but only
the name of the icon. Every implementation will then use the preferred
actual file depending on the size (this is still from the same spec).

Concerning cairo-dock, there can be a bug, or maybe the .desktop files
it uses are copied to a static config dir, and thus are not updated. But
Cairo-dock is likely to use 48x48 icons, which are present in PNG format
- maybe I'm missing something?

Though, Firefox does not seem to have a SVG icon available: AWN uses the
48x48 PNG version. This explains why on the Desktop, it does not resize
without being aliased.


To sum up, yes, having SVG icons for every app would be good, and no, it
does not hurt performance. The best to do is reporting bugs upstream,
that should not take them too much time to fix.

Cheers

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 05:53 PM
"Mackenzie Morgan"
 
Default Use SVG icons instead of PNG

On Feb 9, 2008 1:27 PM, Milan <nalimilan@club.fr> wrote:

To sum up, yes, having SVG icons for every app would be good, and no, it
does not hurt performance.

Depends on your system.* The calculations for SVG technically take more cycles to do than just drawing a raster does.* I'm guessing the 10 year old computer at my dad's house would be slower with SVG than with rasters, but P4 and newer wouldn't have any noticeable difference at all.* Maybe having a powerful GPU makes the point moot, but vectors do require more calculations than rasters do.


--
Mackenzie Morgan
Linux User #432169
ACM Member #3445683
http://ubuntulinuxtipstricks.blogspot.com <-my blog of Ubuntu stuff
apt-get moo
--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 08:09 PM
Milan
 
Default Use SVG icons instead of PNG

Mackenzie Morgan wrote:
> On Feb 9, 2008 1:27 PM, Milan <nalimilan@club.fr
> <mailto:nalimilan@club.fr>> wrote:
>
> To sum up, yes, having SVG icons for every app would be good, and
> no, it
> does not hurt performance.
>
>
> Depends on your system. The calculations for SVG technically take
> more cycles to do than just drawing a raster does. I'm guessing the
> 10 year old computer at my dad's house would be slower with SVG than
> with rasters, but P4 and newer wouldn't have any noticeable difference
> at all. Maybe having a powerful GPU makes the point moot, but vectors
> do require more calculations than rasters do.
This assessment was referring to my previous comment:

> As for the performance side, several PNG icons are generated, one for
> each common size so the system doesn't need to use the SVG version. SVG
> is only used when really needed (i.e. for sizes superior to 22x22 or 48x48).
Which implied that installing more SVG files wouldn't hurt performance since they won't be used unless you don't have a suitable PNG version at that size. Resizing a PNG that will be blurry or drawing a smart SVG is likely to be quite the same in terms of calculation.


Apart from that, it is obvious that we don't want to make every icon displayed on the desktop come from a SVG, that would be waste of GPU. our current mechanism is quite good, indeed: installing every needed size in PNG, and a SVG version for special cases will solve all problems.


Cheers


--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 09:30 PM
"A. Walton"
 
Default Use SVG icons instead of PNG

On Feb 9, 2008 1:53 PM, Mackenzie Morgan <macoafi@gmail.com> wrote:
> On Feb 9, 2008 1:27 PM, Milan <nalimilan@club.fr> wrote:
>
> > To sum up, yes, having SVG icons for every app would be good, and no, it
> > does not hurt performance.
> >
>
> Depends on your system. The calculations for SVG technically take more
> cycles to do than just drawing a raster does. I'm guessing the 10 year old
> computer at my dad's house would be slower with SVG than with rasters, but
> P4 and newer wouldn't have any noticeable difference at all. Maybe having a
> powerful GPU makes the point moot, but vectors do require more calculations
> than rasters do.
>

Shouldn't matter; even if the SVG took ten times longer to render than
the PNG did to decompress, for slower machines, you'd just dump the
PNG back to disk and read it in next time (until a different
resolution is needed, when you re-render from SVG). Also, most
toolkits already do very aggressive caching (GTK+ especially so, to
avoid hitting and drawing SVGs every time around).

With the push towards GPU acceleration (in cairo expecially), now's
the time to start shipping SVGs.

-A.Walton.

> --
> Mackenzie Morgan
> Linux User #432169
> ACM Member #3445683
> http://ubuntulinuxtipstricks.blogspot.com <-my blog of Ubuntu stuff
> apt-get moo
> --
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>
>

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-09-2008, 09:36 PM
Ioannis Nousias
 
Default Use SVG icons instead of PNG

Milan wrote:
> SVG icons have to be generated and present in the "scalable" subdirs of
> your theme, or of the fallback theme ("hicolor"). Most apps already have
> SVG icons, maybe some don't install them.
> As for the performance side, several PNG icons are generated, one for
> each common size so the system doesn't need to use the SVG version. SVG
> is only used when really needed (i.e. for sizes superior to 22x22 or 48x48).
>
I can see how that works in static/specific icon sizes, but considering
the numerous visual effects we get on our modern distros these days, in
most cases we are dealing with dynamically changing icons. Cairo-dock is
one example, several compiz plugins (like shift-switcher, scale or even
zoom) are some more. And with 'resolution independence' coming in the
near future, I can't see how PNG could 'survive'. You would need a
fairly high resolution PNG as a bases to avoid aliasing. And as you
said, resizing a pixmap isn't necessarily less computationally intensive
than rendering vector graphics. (well, it depends I guess)


> Ideally, .desktop file should not use .png or .svg extensions, but only
> the name of the icon. Every implementation will then use the preferred
> actual file depending on the size (this is still from the same spec).
>
thanks for the tip. sensible approach.

> Concerning cairo-dock, there can be a bug, or maybe the .desktop files
> it uses are copied to a static config dir, and thus are not updated. But
> Cairo-dock is likely to use 48x48 icons, which are present in PNG format
> - maybe I'm missing something?
>
you are probably right about the local copies of .desktop files (I
haven't looked at this yet though). Cairo-dock is using SVGs for its
launchers.

> To sum up, yes, having SVG icons for every app would be good, and no, it
> does not hurt performance. The best to do is reporting bugs upstream,
> that should not take them too much time to fix.
>
out of the 273 .desktop files in my /usr/share/applications, 31 use explicitly .png suffix in their 'Icon' field, 7 use .svg, 8 .xpm and the rest don't specify a suffix. Where should I file a bug report for this? It would be cumbersome to file a bug report for each application that does not conform to the standard.




--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-10-2008, 12:10 PM
Milan
 
Default Use SVG icons instead of PNG

Ioannis Nousias wrote:
> I can see how that works in static/specific icon sizes, but considering
> the numerous visual effects we get on our modern distros these days, in
> most cases we are dealing with dynamically changing icons. Cairo-dock is
> one example, several compiz plugins (like shift-switcher, scale or even
> zoom) are some more. And with 'resolution independence' coming in the
> near future, I can't see how PNG could 'survive'. You would need a
> fairly high resolution PNG as a bases to avoid aliasing. And as you
> said, resizing a pixmap isn't necessarily less computationally intensive
> than rendering vector graphics. (well, it depends I guess)
>
Here SVG would be required, but if you use composite graphics, you
accept to spend GPU power on it, and so that's not really a problem. In
this case SVG is the best and only solution, anyway.
Resolution independence should not be problematic, icons will still have
a fixed size and so PNG will be right.
> <snip>
>> To sum up, yes, having SVG icons for every app would be good, and no, it
>> does not hurt performance. The best to do is reporting bugs upstream,
>> that should not take them too much time to fix.
>>
>>
> out of the 273 .desktop files in my /usr/share/applications, 31 use explicitly .png suffix in their 'Icon' field, 7 use .svg, 8 .xpm and the rest don't specify a suffix. Where should I file a bug report for this? It would be cumbersome to file a bug report for each application that does not conform to the standard.
>
Every trivial bug that affects so many packages is a pain to solve. You
can still create an unique report on Launchpad, and mark it as affecting
several packages: this is faster to do and allows to see the progress of
the work. But many times, you have to report a bug upstream for each
project too so that developers know about it, so it can be a really
boring work.

At least, reporting bugs for a few of the most common applications would
help much, many other apps are only configuration tools or so, and don't
really need an eye-candy launcher (at least this can wait).

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 
Old 02-10-2008, 01:42 PM
Ioannis Nousias
 
Default Use SVG icons instead of PNG

Milan wrote:
> Every trivial bug that affects so many packages is a pain to solve. You
> can still create an unique report on Launchpad, and mark it as affecting
> several packages: this is faster to do and allows to see the progress of
> the work. But many times, you have to report a bug upstream for each
> project too so that developers know about it, so it can be a really
> boring work.
>
> At least, reporting bugs for a few of the most common applications would
> help much, many other apps are only configuration tools or so, and don't
> really need an eye-candy launcher (at least this can wait)

ok, I followed your advice and filed a report for gnome-terminal (which
also exhibits the same issue).

for your records:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/190688

The 'Also affects' option seems to work only for packages/projects that
are already in the bugs data-base. I'll probably file the same one for
few more common applications as well and link them together via 'Also
affects'. If you have any more suggestions how to link them all together
or increase the 'visibility' please let me know.

regards,
Ioannis


--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
 

Thread Tools




All times are GMT. The time now is 05:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org