Scalable Icons

The place to bring up any design issues, or post your own creations

Moderator: Moderator Team

etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Scalable Icons

Post by etko » Fri Mar 24, 2006 4:05 am

How much work would be required to have WMF/SVG scalable icons?
As far as I know icons are capable of having multiple entries so adding new lump with WMF or SVG information shouldn't be a problem.

I think this would be quite good addition and to have it from start, it would be possible to save lot of work with icon creation as these icon are able to look good at any size because of the dynamic size. However this requires quite fast rendering engine. The good thing is icons can be cached to standard windowsicon cache. However I don't know whether reactos uses such thing.

cmoibenlepro
Posts: 483
Joined: Tue Nov 30, 2004 5:44 pm
Location: Canada

Post by cmoibenlepro » Fri Mar 24, 2006 5:49 am

The problem I see is that it would need to be done in parallel with the current system (.ico icons) to continue the compatibility with windows.
So it could be a lot of work... :?

.aart3k
Posts: 339
Joined: Sat Apr 01, 2006 11:21 am

Post by .aart3k » Thu May 18, 2006 6:13 pm

I think the some problem solution can be modified .ico files. The file could contain SVG format picture and bitmap ICO. ReactOS could recognize these files as SVG icons and render them as vector graphics, but Windows must be cheated in some way, to provide comatibility of ReactOS icons with Windows.

Cristan
Posts: 170
Joined: Thu Feb 02, 2006 11:41 am
Location: The Netherlands

Post by Cristan » Thu May 18, 2006 11:59 pm

It would be cool when specifying an icon, you can select an SVG file. Why hack the ico format?

Also, it could be cool if the default ReactOS icons would be SVG. On the other hand: exept that it's cool, it's a complete waste of resources. If you need a 48 * 48 icon, why not take that one from an ico, in stead of rendering one from SVG? It sure as hell saves a lot of CPU cycles.

.aart3k
Posts: 339
Joined: Sat Apr 01, 2006 11:21 am

Post by .aart3k » Fri May 19, 2006 10:24 am

Why hack the ico format?
Because of Windows compatibility.

etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Post by etko » Thu May 25, 2006 2:25 pm

Cristan - I have seen Linux implementation of this feature and it was not slow at all. I mean for reasonably designed icons it will not be that much slow. The linux icons I saw were quite elaborate. They were svg.
Once you draw icon into the bitmap, you can cache it and reuse it many times, icons like filetype icons are used many times directly from cache instead of being loaded from icon file. As far as I know Windows already has cache like this, and this cache seems to me more or less persistent (for example when you delete physical icon file, lnk files and start menus have this icon cached).
I guess ReactOS uses same approach. If it's like that, plugging SVG/WMF renderer code to store icons into this cache, from which they are pulled out anyway when they are drawn, seems like reasonable and doesn't require extremly big change. Plus WMF/EMF interpreter/renderer must be implemented in any case to ensure compatability with Windows. However me myself I am not able to do so ;).

MadRat
Posts: 243
Joined: Fri Feb 04, 2005 8:29 am
Contact:

Post by MadRat » Thu May 25, 2006 2:36 pm

Emblems over the icons are cool and add no real performance degradation, too. Would be nice to see them implemented on a transparent level of interaction with the OS.
*************************************
Go Huskers!

Phalanx
Posts: 360
Joined: Sun Dec 19, 2004 12:42 am
Location: Australia

Post by Phalanx » Fri May 26, 2006 6:27 am

etko wrote:Cristan - I have seen Linux implementation of this feature and it was not slow at all. I mean for reasonably designed icons it will not be that much slow. The linux icons I saw were quite elaborate. They were svg.
Once you draw icon into the bitmap, you can cache it and reuse it many times, icons like filetype icons are used many times directly from cache instead of being loaded from icon file. As far as I know Windows already has cache like this, and this cache seems to me more or less persistent (for example when you delete physical icon file, lnk files and start menus have this icon cached).
I guess ReactOS uses same approach. If it's like that, plugging SVG/WMF renderer code to store icons into this cache, from which they are pulled out anyway when they are drawn, seems like reasonable and doesn't require extremly big change. Plus WMF/EMF interpreter/renderer must be implemented in any case to ensure compatability with Windows. However me myself I am not able to do so ;).
You can do many things with the cache, like flushing it etc. It does catch up when you change an icon, but may take a little bit of time or refreshing that area.

.aart3k
Posts: 339
Joined: Sat Apr 01, 2006 11:21 am

Post by .aart3k » Sun May 28, 2006 8:14 pm

Maybe a construcion based on 3 files: icon settings (*.ini or sth like desktop.htt or thumbs.db, or withoput this file: ReactOS caches icon.svg into icon.ico automatically) , icon SVG file, icons cache (*.ico) would be usable? It could be easly handled by ReactOS and be compatibile with Windows.

ThePianoGuy
Posts: 3
Joined: Sun Jun 18, 2006 9:42 pm

Post by ThePianoGuy » Fri Sep 22, 2006 11:31 am

I second the idea of svg icons. KDE and GNOME use svg icons for years now and they overpass MS ico drastically. I think ico is completely outdated - it supports only 256 colors, no compression and usually small sizes. Let alone alpha channel etc. ReactOS should support ico files only for compatibility. Otherwise, internal ReactOS's icons (like explorer etc.) should use svg icons natively IMO. They're scalable which means they're much easier to maintain for larger sizes and resolutions etc. We can make SVG icons even animated.

Of course, eventually it's the developers' call.

Just my 0.01€ :)

Matthias
Posts: 496
Joined: Tue Dec 27, 2005 12:43 am

Post by Matthias » Fri Sep 22, 2006 2:50 pm

ThePianoGuy wrote:I second the idea of svg icons. KDE and GNOME use svg icons for years now
KDE uses PNG icons, and i seriously doubt that GNOME uses SVGs.

counting_pine
Posts: 237
Joined: Fri Nov 26, 2004 10:44 pm
Location: Fallowfield

Post by counting_pine » Fri Sep 22, 2006 3:12 pm

ThePianoGuy wrote:I think ico is completely outdated - it supports only 256 colors, no compression and usually small sizes. Let alone alpha channel etc.
Actually, Windows has supported full colour icons for some time, and Windows XP supports alpha channels in 32-bit icons.
Icons support all the graphical features that PNGs do, as well as supporting multiple images for different sizes and colour depths. The only thing it doesn't really support is compression, so the icons take up more space, but they're quicker to load because they don't need to be uncompressed.

ThePianoGuy
Posts: 3
Joined: Sun Jun 18, 2006 9:42 pm

Post by ThePianoGuy » Fri Sep 22, 2006 3:25 pm

KDE uses many icon formats (PNG as well of course). But most of them are becoming SVGs (lookng at icons currently on my desktop: home icon, folder icons, most of games, amusements, k3b, amarok, blender).

You can check this screenshot of my desktop:
http://193.95.242.3/tmp/screen5.png

The Konqueror's window is showing some pdf files, java classes and some folders. I intentionally zoomed the icons (ctrl+mouse wheel) and moved the two folders so they overlap a bit - they even support transparency. On background, it's nice to see the difference between Finale (Windows ico file running under Wine) and K3b, Amarok and Kaffeine applications using SVG.

SVG icons under KDE can be found at /usr/share/icons/*/scalable. They are in .svgz format (zipped svg as svg is xml plain text and consumes quite a bit).

oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm » Sun Oct 01, 2006 4:21 am

Freedesktop standard say all icons will be in either SVG or PNG.

XPM is only still tollearted for old applications pre standard.

Note SVG is prefered in a lot of ways. Allowing a lot more flex in sizing. Ie 1 pixel increments in icon sizes can be done in linux without problems.

PNG support will come because Vista icons are a alteration of this.

So by standard there are not many Icon formats for linux desktops. Only 2 of them. The third is for old applications XPM is the X11 bitmap.

There is no reason why reactos cannot support freedesktop icon theming or icon naming even to just import them.
http://standards.freedesktop.org/icon-n ... atest.html
http://standards.freedesktop.org/icon-t ... atest.html

/usr/share/icons/*/scalable This is the standard location defined in the Linux Standard Base. Gnome and XFCE look there for svg icons too.

Andrewm1986
Posts: 108
Joined: Thu Jul 07, 2005 4:08 pm

Post by Andrewm1986 » Mon Oct 02, 2006 9:59 am

Just to ask a question.

Why do reactos icons need to be compatable with windows? I understand that reactos needs to be able to support .ico files, but I see no reason why it cannot support MORE formats than windows...

You have to convert other image formats (jpg, gif, svg, png) to ico on windows if you wish to use them as icons anyway.

Andrew

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest