Slashdot Mirror


Major Step Forward For SVG in the Desktop

Ur@eus writes "SVG the w3c format for Scalable Vector Graphics is seen as many as the future of desktop icons as it allows for scaling icons etc. without loss of quality. Dominic Lachowicz has been working hard on fixing bugs in librsvg over the last few days. The result is that librsvg now renders all available SVG icons perfectly. Not only do it render them, but it renders them faster than libpng renders the same images in png format. Together with the gdkpixbuf plugin librsvg offer it means GNOME 2.2 will be able to use SVG images not only for icons or desktop backgrounds, but also for the GUI widgets themselves and the graphics of the window manager. Dom's announcement can be found on the librsvg mailinglist. The librsvg site also offer a GNOME 2.2 metatheme using mostly SVG icons including a nice screenshot."

27 of 363 comments (clear)

  1. Re:Not needed for desktop by e8johan · · Score: 4, Interesting

    IF SVG supports raster (pixelbased) graphics, together with the vector graphics (as textures or something), this could be really useful. An ultimate graphics format, the holy grail...

    As for not being needed on the desktop. Optimizations are *always* needed and useful. Also, this can finally mean truly resolution independent graphics. Simply know the dpi of your screen and all will always be the same size, independent of grannys old 640x480 and mine 1280x1024...

  2. Stateful Icons? by Masem · · Score: 5, Interesting
    Could this also be used to build 'icons' with stateful representations of the objects they are supposed to represent? For example, instead of just 'empty' and 'full' for Trash/Recycle, could you have folders icons that have 'empty', 'sparse', 'full', and 'stuffed'? Or icons that reflect the read/write nature of the folder with respect to the user? Or even more down the road, icons that aren't pointing directly to files/folders but as system objects (as say down the /dev tree), such as a clock, a CPU meter, etc...? Yes, we have that functionality through many means, such as WM's dockapps, or by using shaped windows to simulate that. But if you look at the Mac OS X Dock, or the various things you can do with ObjectDesktop by StarDock systems on the Windows side, they reflect the ideas that I'm thining about here. Sure, it's nice to have, in WM , the status of my system along the right side easy to see, but I'd like it better if I could have a better control over how those are appearing on my desktop, and if I could make them true icons, draggable and placable whereever I want, that would be great.

    Even more so, using XML and SVG, it would be very easy to create additional icons without a lot of programming behind it. You may need to a SAX reader to take the stateful information into some form, but after that, it's just XSLT transformations into SVG, and voila, you have an easy way to make cool meters/icons.

    --
    "Pinky, you've left the lens cap of your mind on again." - P&TB
    "I can see my house from here!" - ST:
    1. Re: Stateful Icons? by Textbook+Error · · Score: 3, Interesting

      Same idea in Mac OS X - which calls them "badges". The API lets you composite one icon reference on top of another and draw it as a single entity (or to find out if an icon reference is actually a composite).

      Personally I suspect there's not a great deal of point in making icons vector: 128x128x32 with a decent scaling algorithm (and an optional set of pre-scaled images at smaller sizes) seems to cover pretty much everything. At least for the tasks icons are typically used for. Anything larger than 128x128 is turning into a picture rather than an icon (yeah, you could use the same format for both, but why bother - 99% of the time an icon is just blitted to the screen or used for hit testing, both of which an 32-bit pixmap is ideal for).

      --

      Nae bother
    2. Re: Stateful Icons? by ajs · · Score: 4, Interesting

      The main reason to do this is rendering speed. Storage size is also smaller, but really you care about the rendering speed of having 5 apps open, all of which use dozens of icons (I'm running galeon, and I count 16 icons in it alone... galeon tends to be light-weight when it comes to baubles compared to say, a spreadsheet).

      People complain that GNOME and KDE are memory-hogs and slow, but realistically, most of the overhead is in things like pixmap storage (not going to go away with SVG or PNG, since both have to be rendered down to an X Pixmap). Beyond that, you have to start hacking away at every bit of performance and memory use you can find. This is one such.

      I assume that KDE already has or is working on SVG too. It's a logical step. Heck, they *could* just use this lib if they don't already have one.

    3. Re: Stateful Icons? by Quazion · · Score: 2, Interesting

      But when i switch to a difrent resolution i hope to get more room, i dont buy a bigger screen for more detail, i want more work space.... but then i have multiple monitors, but still i dont think your point goes up always. But rescaling like i want would be nice :)

    4. Re: Stateful Icons? by Speare · · Score: 2, Interesting

      They're called emblems.

      While emblems affixed to icons are nice, that's not what the parent post was talking about.

      With stateful alternative artwork, a folder icon could appear open or closed or locked or zipped. A trashcan could appear lidded, unlidded, bulging or empty. Emblems don't do that.

      With stateful procedural rendering, a folder icon could appear tinted or shadowed or translucent or scaled to highlight different ownership or age or some other user-defined categorical criteria. Emblems don't do that.

      With stateful procedural animation, a folder icon could glint, shudder, bulge, wave or otherwise animate when the mouse floats over the icon, or when objects change status in some way.

      Further, emblems should be able to do all of these things independently from the icons themselves: the icon itself may glint and bulge while the emblems blush or twist.

      Sure, bad themes would be a distraction, but good themes could provide a lot richer interface to a very dense data space. This is true of Flash, of Skinnable applications, and of GUIs in general.

      --
      [ .sig file not found ]
  3. Once again... /.'ers rally against the cause... by Anonymous Coward · · Score: 5, Interesting

    Jeeeze, just reading a few of the first posts on here you'd think that SVG icons were the end of the world. Nothing could be farther from the truth...

    One of the big reasons I like OSX (and I do not own a Mac, FYI) are the scalable vector icons. We've had vector based fonts for quite some time and you'd be hard pressed to find anybody out there who would rally against the scourge of vector fonts. For crying out loud... I believe it's KDE that has font anti-aliasing. I am sure we all have seen WindowsXP's "clear type" font smoothing. Anti-aliased fonts work pretty damn well and look absolutely super!

    Having the same capability with something as lowly as desktop icon is amazing! The next logical step is UI widgets and other elements of the desktop.

    As more and more LCD and other high-quality displays become the norm (many laptops feature 1400x1050 or 1600x1200 displays these days), not only are scalable fonts and UI widgets neccessary, there is an inherent human aspect to having a computer interface with the same perceived clarity of the real world.

    I think this is a fantastic implementation of vector graphics. I only hope that we can soon have entire UI's based around scalable graphics as well.

  4. A better way to clone the OSX look and feel? by image · · Score: 4, Interesting

    Right after OSX came out, I remember downloading a GTK and Gnome theme for my Linux box that copied the look, if not feel, of OSX. If I recall correctly, that theme was yanked by Apple's lawyers.

    Since then I've started running a OSX box as well, and have to admit that I like the look.

    Now I wonder -- would it be copyright infringement to write a script that extracted all of the SVG icons from a MacOSX box, copy them to a GTK theme directory, and run them on Linux? Thus the distributed theme itself wouldn't have any of the Apple look -- it would simply have the skeleton. The actual artwork would be copied by the end user in the privacy of their own home or office directly off a OSX box.

    The second possibility for this is to be able to run, with almost the exact same look, GTK/Gnome apps on directly on OSX (Apple's release of X11 really is amazingly well done, btw). The X11 integration still wouldn't be perfect of course (apps still have a hard time mimizing to the Dock), but it would be a visual improvement. Or even integrate the ability to search a file's resources to get the SVG icon and display it in Nautilus by default.

    In any case, librsvg sounds very promising. I'm impressed.

  5. Re:odd by Proc6 · · Score: 5, Interesting
    Well dummy, its like this. The higher resolution the display you get, the finer detail images and video (some day) can get. Buuuut... the harder it is to see windows elements of fixed size. (icons) I run 1920x1200 on a flat panel, and when my father sits down in front of it, he has to squint to read the text and see the icons on the desktop. Ever seen 1600x1200 on a Dell Latitude notebook? Go find the IBM QUXGA 22" LCD panel that does something like 5000x3000 and tell me how big the icons on the desktop are. Its like clicking on dust.

    SGI's Indigo Magic desktop has done scalable vector icons forever, and its beautiful. Not only can you set the standard icon size but they put a handy thumbwheel in the "explorer" window to let you zoom in and out of your files.

    Don't knock it till you've tried it. :)

    --

    I'm Rick James with mod points biatch!

  6. Finally, great news for users :) by CheeseCow · · Score: 5, Interesting

    This is excellent news. After getting a new monitor that does 1600x1200, I found those tiny icons a bit hard to click at times. But now, I can run whatever resolution I want, and the icons will just look better & better.

    Heck, now the word "resolution" will start to have meaning! Instead of getting more small icons on your screen when going from 800x600 --> 1600x1200, you could get more detailed ones. And if it renders faster than PNG images, then we can have both great looks & high speed. Way to go! :D

  7. Mindblowing by CoderByBirth · · Score: 5, Interesting

    I really think that scaleable icons are gonna be THE killer application of tomorrows operating systems.

    Seriously, why not go all the way and question the whole concept of icons?
    They could be allowed more degrees of freedom in their representation of a complex data object. Consider a 3D spinning folder icon, which somehow gives you an idea of how much data/what type of data is contained in the folder.
    Now THAT would be neat.

  8. Corresponding Browser support? by brianjcain · · Score: 4, Interesting

    So can we expect similar native SVG support from our favorite gratis and libre browsers (Mozilla, Opera, et al) soon? I think it's only been available via a plugin before.

  9. Re:I just don't care! by Sayjack · · Score: 4, Interesting

    Yes, but wouldn't it be nice to have more scaling choices than large/medium/small? There's more to SVG than just scaling graphics anyhow. Serialization is another goal of svg, hence you may be seeing the beginnings of webservices dedicated to serving up icons, animations, etc... XML and it's cooperative technologies are evolving rapidly.
    SVG puts powerful non-proprietary (bye bye gif) graphics capabilities in the hands of the xml architect. It fills a necessary gap in the XML arsenal. As the other technologies evolve, it's benefits will become more readily apparent. Imagine an XSL transform capable of transforming an XML document containing data into a graphical representation of itself...

    Programmable content can be embedded as well in the form of applets and XHTML objects. Apache's Batik project is a good example of what you can achieve. Batik can be found here.

    --

    -- Good judgement comes with experience. -- Experience comes with bad judgement.

  10. Svg Developpement by Sepper · · Score: 2, Interesting

    Nice to see progress being made in this direction...

    For thos who do not understand the value of making Svg work on the desktop, it's because you never worked with SVG before.

    I've worked all summer long on a job where i had to make a (sacled down and very acurate) map available via web... and it had to be interactively linked to a database...

    Now with fixed image this could have been a real pain, but once the map had been transfered from autocad, it was a simple matter: the text in tha map was clickable!

    (well, i did have to write a script to build the Svg from a DXF file and it really needs to be cleaned before i post it)

    The biggest problem i had to face was the fact that not a single svg viewer passed the W3c Test. The best one i had at the time (The Adobe SVG viewer) was not capable of anchor viewport (ie, using wahtever.svg#viewportdef to automagicaly load the viewport 'viewportdef')

    I just wish the format could be more popular... it could the next flash...

    --
    I live in Soviet Canuckistan you insensitive clod!
  11. Re:Expanding Complexity by tjwhaynes · · Score: 4, Interesting

    I don't see that it makes much sense. after all 16x16 or 32x33 icons have been around fr a long time. they're even-byte things and easy to handle. and they're quick

    And so are SVG icons - a lot of the current SVG icons are quick to load (requiring considerably less memory to describe the icon than PNG) and quick to draw with this fast renderer. But that is ignoring the most useful part of describing your screen using vectors, splines, etc. - rescalability. We're all used to being able to switch monitors with different DPI and still have the same physical size font on the screen (so that 10 pt is 10/72 inch high regardless of screen dpi) and it's useful to be able to have icons which behave in the same way.

    isn''t a desktop all about making a useful user experience? if I wanted gigantic icons I'd have gigantic icons, and I don't. It seems like extra complexity just for a coding exercise.

    For people with normal eyesight, standard 16x16 or 32x32 icons are going to be fine. If you suffer from poor eyesight, being able to have fonts and icons at say 4x magnification is extremely useful. And a big part of the GNOME2 architecture is strongly accessibility orientated so this is a useful part of the puzzle.

    Cheers,
    Toby Haynes

    --
    Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  12. About scalability by Anonymous Coward · · Score: 1, Interesting

    The thing about scaleability of vector graphics (including SVG) is that the scaling works great if your are making the graphic bigger. However, if you want to make the graphic smaller you could have trouble. The problem is when you start to get to a small size the stroke thickness of the vectors cease to scale at some point thus distorting the intent of the graphic artist who designed it. For example, say you had a square with a black line that was 20px x 20px and the stroke of the line was 1 pt. If you cut the size in half to 10px the stroke should scale to .5pt (roughly half a pixel). So the problem becomes, how do you render half a pixel? You anti-alias it that's how. Unfortunately this would lead to 'blurry' looking little icons and mine eyes are sore as it is! ;)

    I'm not saying that SVG is bad just that the scalability is not never ending and for small icons this may not be a good choice. It is also not likey SVG could allow you to 'design one l33t icon for all resolutions!' because of these issues.

  13. Mozilla by Anonymous Coward · · Score: 4, Interesting

    Mozilla has a native SVG project that's been around for awhile.

    I've always thought this would be the coolest thing ever: native SVG in a browser. I've thought of all sorts of great applications of this idea--I do mostly statistical analysis and to be able to put all the output, graphics and everything, into one file in a open, standard format that's read by a browser sounds wonderful.

    The problem as I understand it is that the SVG library Mozilla currently uses has a license that's incompatible with the Mozilla license. Mozilla native SVG is available in a separate download and has some functionality, but not anywhere near all of it. I've always thought it seemed a bit strange that someone couldn't find a Mozilla-capable SVG library, or that it would be that difficult to build one (I would help, but I just don't have anywhere near the expertise necessary).

    So, this stuff about Mozilla native SVG may seem offtopic, but it's really not, in a way: does anyone know if the library used for the SVG icons has any utility for Mozilla SVG or other open source browser-native SVG projects?

  14. 'half-blind' by Big+Sean+O · · Score: 4, Interesting

    Funny how you mention half-blind.

    SVG is one of the few 'imaging technologies' that has very good support for accessibility. Each drawn object can have a title and a description, so whereas you see a "stuffed garbage can", the braille user-agent would output the desc text: "Garbage Can containing more than 1 MB of trash".

    SVG could also be used for an org charts, and instead of having a long 'alt' tag would probably be out of sync with the 'gif', the blind user would be able to read the contents of each box, and depending on how the SVG is structured (with groups and defs), even get an idea of how the boxes are related.

    Also, SVG supports CSS, so you can have different stylesheets for different media (screen, printer, cell-phone-screen, and even braille and audio).

    As far as an imaging technology goes, since it's just another XML format, you can grab an XML document (say in the Weather Observation Markup Format) and use XSLT to output a nice SVG graphic showing the weather. (In fact, that's one of the example used in O'Reilly's SVG Essentials).

    I've just started using SVG (with Python) as a way to transform map data from the US Govt and make nice little SVG maps for my browser (kind of like a hand-rolled Mapquest).

    Programmers familiar with XML will be able to make some neat (albeit very ugly) stuff. Designers who know the fancier drawing tools will be able to make some pretty nice-looking stuff. Put 'em together and you can have some nice smart graphics. Will it replace flash? Who knows.

    --
    My father is a blogger.
  15. What's going on? by Tyreth · · Score: 4, Interesting
    Why are there so many people complaining about "what's the point of SVG" or "what a waste of time" kind of arguments. What's the issue here?

    I can't believe people here have so little imagination. It's almost like they are posting just to get modded up for having a 'radical' opinion. I mean, come on, what's the problem with SVG? It's not like the time spent coding on it is going to mean KDE3.2 will be delayed a month, or that Gnome will have more bugs. This is just one of the many enhancements that make Linux, and software in general, nicer. We should be talking about the fun things we can do with SVG, or the improvements that could be made, or any encouraging notes on it. Not about whether it has a point at all.

    Let me illustrate some points for the creatively challenged:

    • Prettyness - this is the most obvious. Most people like something that looks good! Sure, it may not have an obvious practical advantage, but humans are naturally attracted to things that look good, as opposed to a website with black background, red/yellow flashing text with images with white backgrounds. There may be something deeper to this - when something looks professional /pretty, it feels easier to understand. The less attractive it is, the more complex it feels. Quite simply, the more something feels like sphagetti the less our mind will be able to comprehend it and move on to newer things. The neater something is and the more we comprehend it, the easier we will find to move on to something new.
    • Resolution - been mentioned earlier. Different resolutions require different font sizes. This means that the artist can make an icon that will be useful from now until the time computers go primarily 3d. They don't need to anticipate resolutions of the future, their work will scale seamlessly.
    • Speed - this is a speed improvement. The more our code is improved and sped up, the more integrated it can be. This is just one of many enhancements to Linux that make community software that bit better.

    So, onto something more positive: what's the state of SVG in KDE? I really enjoyed it in Gnome 2 for the time I used it, but it was a bit slower when they got large. These speed improvements are certainly good news.

  16. Deformable matching for scalable graphics by more · · Score: 3, Interesting
    It is nice to have the sharp features aligned with the pixel boundaries while still maintaining approximately the geometric relations. Perhaps a deformable match of the high frequency features with the pixel boundaries could be a solution for showing glyphs most accurately on pixelized displays?

    Deformable matches are used in advanced medical applications between 3d volumetric images: CT, MRI, PET, etc.

    --

    -- Imperial units must die --

  17. Display SVG by DrXym · · Score: 4, Interesting
    Screw the icons, how about a complete display SVG engine akin to Display Postscript / Aqua?


    If this lib as fast as it claims (at rendering though I doubt parsing), then why not? Windows and other elements in the display would break-down into SVG commands that would be rendered as required. Perhaps it would prove a very efficient way of presenting a remote desktop too rather than sending down bitmaps like VNC does at present.

  18. Patent issues all resolved? It _appears_ so... by dwheeler · · Score: 3, Interesting
    At one time, I recall that there were some serious patent issues with SVG. Basically, SVG wasn't really an open standard, because it was patent royalty encumbered - giving an automatic disadvantage to those who weren't patent holders, making it impossible to implement using open source software / free software, and discouraging implementation in any place where expenses have to be kept down (including some small businesses and mass market devices).

    According to http://www.w3.org/2001/07/SVG10-IPR-statements.htm l and http://www.w3.org/Graphics/SVG/Disclosures, this appears to have been resolved to permit royalty-free use.

    If this is true, that's a real victory for the new W3C policy (and for the world in general). Thanks to all. Please let me know if I'm misinterpreting something.

    --
    - David A. Wheeler (see my Secure Programming HOWTO)
  19. Remember the NeXT... by kahei · · Score: 2, Interesting


    Remember how the NeXT boxes had postscript displays? Whatever needed to be drawn on the screen was expressed as postscript, and the display was a postscript renderer. It worked beautifully.

    SVG is much more powerful (for desktop things, not necessarily for printing/typesetting things) than postscript. I think this is an excellent step.

    --
    Whence? Hence. Whither? Thither.
  20. Re:SVG trade-off .. by Knobby · · Score: 4, Interesting

    I'm not so sure why it would be faster to render the SVG and display the PNG (which needs to be decompressed), but keep in mind that it may depend on the test platform. Under Mac OS X 10.1, a lot of people were using a little command line hack that compressed the frame buffer. The memory bus was a bottle neck, and it was faster to compress and decompress the frame buffer than it was to move the uncompressed frame across the bus.. Just a thought.. CPU cycles are cheap, improve the memory system is not..

  21. SVG vs. PNG by daVinci1980 · · Score: 4, Interesting

    I read this claim again and again, and it still doesn't sit well with me. I worked on a vector-based rendering engine for awhile (in fact, the fastest vector-based rendering engine [begins with an f, ends with a lash]), and there are certain limitations that cannot be overcome.

    When it ultimately gets down to it, a PNG file is a compressed bitmap. There is a fixed cost to rendering it, which can be expressed as an amortization of the dimensions of the image. Its just like fill-rate on a 3-D card.

    When rendering any vector format, there are many dependencies. Is AA enabled? Which AA algorithm was used? Are they using a scanline renderer, or actually rasterizing each vector regardless of its impact?

    The same reason which allows SVG to be faster than PNG rendering is the same reason that other cases will be radically slower: rendering each vector disregards the size of the image being rendered. How can this make it slower? Imagine an image filled dozens or hundreds of times with the same vectors that fill the image completely. Suddenly, we're not having to fill a rectangle, we're having to fill it multiple times in comparison to the png drawing in the same space. And the problem gets worse the larger the destination size.

    Using a scanline renderer for vector based graphics has a much better cost comparison to png format, but it will always be slower as ultimately bitmaps can be embedded within vector formats.

    As a simpler analogy; the vector graphics are to the transformation pipeline or a graphics card what bitmaps (and pngs) are to the rasterization on the video card. Transformation without rasterization is meaningless, and therefore always going to be slower.

    --
    I currently have no clever signature witicism to add here.
    1. Re:SVG vs. PNG by scrytch · · Score: 2, Interesting

      As a simpler analogy; the vector graphics are to the transformation pipeline or a graphics card what bitmaps (and pngs) are to the rasterization on the video card. Transformation without rasterization is meaningless, and therefore always going to be slower.

      Except that most 3d cards will rasterize them internally and not have to a) use main memory, b) transfer main memory across the bus, or c) involve the CPU in a meaningful way. If a good SVG to OGL or D3D mapping can be found, you most certainly can render it faster than a PNG.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  22. Re:This is a great thing!!! by BigJimSlade · · Score: 2, Interesting

    I look forward to the day when there is no more Flash

    You may be waiting for something else then. While SVG supports animated vector graphics, there isn't anything in the spec for syncing audio to the graphics. I believe Adobe's plug-in has extensions for adding a sound clip, but still no way of syncing this up with what's happening in the animation.