Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 much smaller comix.svg

closed
Pontus Ekberg
None
5
2006-08-24
2006-08-22
Alan Horkan
No

Inkscape is notoriously verbose in the SVG it produces.
It looks like the file you started from was part of the
Etiquette icons set, which is probably why it had a lot
of extra information.

The comix SVG file contained a whole lot of unused
gradients.
I was able to cut the file size from 19kb to 5kb simply
by deleting the unused defines. Obviously the file
size could be shrunk even further with manual tweaking
of the markup or using compressed SVGZ but I'm not
going to do either of those.

(By the way it would be great if you could enable SVG
support in Comix. Gdkpixbuf optionally supports SVG
with the help of librsvg, so maybe if there was some
way to fallback to gdkpixbuf you might be able to get
SVG at no extra cost.)

Discussion

  • Alan Horkan
    Alan Horkan
    2006-08-22

    much smaller comix svg file

     
    Attachments
  • Pontus Ekberg
    Pontus Ekberg
    2006-08-24

    Logged In: YES
    user_id=1250348

    Thanks again, but I'm sorry to tell you that I have created
    a new icon for version 3.5, I didn't really like the last
    one. This one is also created with Inkscape, but it is only
    3.6 KB. Perhaps that one can be made smaller as well, but I
    don't know how, I'm not very familiar with the inner details
    of SVG files. The last one was created from scratch though,
    not derived from Etiquette, it was traced from a raster
    image I created, it is possible that caused unnecessarily
    verbose output.

    I have also added support for SVG to version 3.5, as well as
    a bunch of other new formats. The reason I kept some out
    from the beginning was that Comix defines file formats by
    magic numbers and not from filename extensions, and some
    cruft files (binary configure files in ~/ for an example)
    were incorrectly identified as some obscure image format.
    That led of course to a lot of files that Comix tried to
    display, but that were only garbage. I did some more
    research now though, and it seems as most of these files
    were identified as WBMP image files, so I added read support
    for most of the others, and I have not encountered any
    difficulties yet myself.

     
  • Pontus Ekberg
    Pontus Ekberg
    2006-08-24

    • assigned_to: nobody --> herrekberg
     
  • Alan Horkan
    Alan Horkan
    2006-08-24

    Logged In: YES
    user_id=402612

    > but it is only 3.6 KB. Perhaps that one can be made smaller

    I doubt it. Well maybe if I wanted to be really pedantic
    and spend ages rewriting the source but signficant gains are
    unlikely from a file already that small.

    > I have also added support for SVG to version 3.5, as well as

    Sweet. Maybe I can find an SVG comic created by Inkscape
    users and package it up as a good example for Comix (or my
    own testing at least).

    Thanks. Closing this report.

     
  • Alan Horkan
    Alan Horkan
    2006-08-24

    • status: open --> closed
     
  • Pontus Ekberg
    Pontus Ekberg
    2006-08-24

    Logged In: YES
    user_id=1250348

    Perhaps I should note that it is a crude SVG support. It
    works just like many other image viewers work with SVG, it
    loads the file at the specified resolution, but zooming in
    will zoom on the created bitmap, thus not taking advantage
    of the vector graphic capabilities of the format. It should
    be possible to apply a hook so that any zooming on a SVG
    image triggers a reloading of the entire file at another
    resolution, but that would require much more work, and
    possibly be very slow.

     
  • Alan Horkan
    Alan Horkan
    2006-08-24

    Logged In: YES
    user_id=402612

    Various gnome apps like EoG did it that way too (for ages
    and ages, although they may have fixed it since) so you are
    in good company. Having the basic support enabled is the
    really useful part.