SVGear — The ultimate tool for SVG and Haiku Icons (HVIF)

Hi everyone!

I want to share a project I’ve been working on recently. Meet SVGear.

SVGear is now available in HaikuDepot.

It started out as a convenient SVG viewer, but during development the project evolved, and the app turned into a comprehensive suite for working with vector graphics and-most importantly-for creating native Haiku icons (HVIF).

What can SVGear do?

Of course, it opens and displays SVG files (using NanoSVG under the hood), allowing you to zoom, pan, and inspect the structure of paths and shapes. But the most interesting parts are the tools for developers and designers:

  • Versatility (Import & Export)
    SVGear acts as a universal converter.

    • Input: SVG, HVIF, Icon-O-Matic source files (IOM), raster images (PNG/JPG for vectorization), and it can even read icons directly from file attributes.

    • Output: SVG, binary HVIF, IOM (text format), raster PNG (at any size), and source code (see below).

  • Vectorization (Image Tracing)
    This is probably my favorite feature. You can open a raster image, and SVGear will convert it into a vector! Under the hood, it packs a ton of settings: background removal, gradient detection, path simplification (Visvalingam-Whyatt, Douglas-Peucker), and noise filtering. It’s perfect when you need to quickly turn a logo image into a usable icon.

  • HVIF Store Client
    The app features a built-in client for hvif-store.art. You can search for icons by tags, preview them, and download them immediately in the format you need, without ever opening a web browser.

  • Code Generation
    The app is tailored for development. You can instantly generate code from any open file to paste directly into your project:

    • RDef code (resources).

    • C++ array (unsigned char array).

    • All of this features syntax highlighting within the built-in editor.

  • And the little things:

    • HVIF size estimation (to ensure the icon fits within file system attribute limits).

    • Drag & Drop: drag icons from the app directly to the Desktop or FileType

    • Full support for Dark and Light themes (follows system colors).

The application is native, fast, and lightweight.

Bonus: CLI Tools & Cross-Platform Support

SVGear is powered by the hvif-tools. This gives command-line lovers a set of powerful utilities:

  • icon2icon: Converts between HVIF, IOM, SVG, and PNG.

  • iom2hvif: Native batch converter from IOM to HVIF (can write directly to file/folder attributes).

  • img2svg: Advanced bitmap-to-vector tracer (the engine behind SVGear’s vectorization).

The tools are cross-platform and can be built on Linux, FreeBSD, macOS, Windows, and Haiku.

  • Windows users: The installer available on the GitHub release page is a complete package. It includes the CLI tools, a Explorer thumbnail provider (preview HVIF/IOM files), Inkscape plugins, and development headers/libraries for use in your own projects.

  • Inkscape users on Haiku: You can open/save HVIF and IOM files in Inkscape by installing the hvif_tools_inkscape package.

I would be happy to hear any feedback, bug reports, or suggestions! I hope SVGear saves you time when creating software for Haiku.

36 Likes

SVGear only for Haiku beta 5? will there be a Walter version as well?

… update: now there is also in HaikuDepot for Walter.

……

Observations-requests:

The program does not appear in the “Open with…” menu for image files in Tracker.

The program cannot import BeOS icons (neither from a file nor from a FileType applet via drag and drop).

What a beautiful piece of software, thank you!

3 Likes

Just tried it on my VM. After installing, every time I chose new options in icon store, I got network errors on refresh despite icons being shown. I closed the app and reopened; those errors never appeared again.
Localisation can be done here on PolyGlot. German, Russian and Turkish are already complete.

Very nice–thank you 3dEyes!

Awesome! Thank you!

This is very strange. I’m seeing the same behavior, even though all the required FileTypes are supported. For some reason, the Roster isn’t seeing them. I need to figure this out.

BeOS icons are very low-resolution raster icons, so vectorizing them as is is a very bad idea; we’ll get very poor results. The only thing I can suggest is greatly increasing their size before vectorizing—then we’ll end up with vector images consisting of squares (pixels). But what’s the point?

1 Like

Thanks for this! I already played around with img2svg in the last days, the SVGear is a great addition to it, guess I’ll be using this more in the future. Great work!!! :+1:

Dude. This is honestly incredible. Also, how long has the HVIF store been a thing??? That’s also amazing!

Oh what an absolutely amazing and awesome application :heart_eyes:
It’s fast and lightweight,but also powerful and feature-packed,and something absolutely unique.
That’s exactly the sort of unique native applications that Haiku needs to show it’s not just one of hundreds of Linux distributions,but something different :+1:

One little bug I noticed: If I enable the three panels in the “View” menu,only the sources panel gets a checkmark in the menu.
If I then disable the sources panel,the other checkmarks show up and stay active even after I enable sources again (now it’s correct with 3 checkmarks).
Likely a minor thing,just wanted to let you know.

1 Like

So that I don’t forget about the error you found or any improvement, the best option is to create a ticket here - GitHub · Where software is built

The domain was registered one month ago

1 Like

I don’t have a account there and I won’t create one.
Feel free to copy&paste my issue description if you want to.

Issue created on behalf of nipos with link to original forum post.

1 Like

I found it and fixed it, and I’ll update it on haikuports soon.

2 Likes

I’m currently experimenting with the Kopf-Lischinsky depixelization algorithm. These are the results on vectorization of pixel art images with very low resolution.

12 Likes

This is a really amazing algorithm. I just had a quick look (not reading) at its documentation… The idea came to me, if possible, to mark different zones in the icon where slightly different algorithm settings could be applied (for example: rounding factor, if there is one)… I actually don’t know if this idea applies to this algorithm at all.

It’s a cluster algorithm, so theoretically it’s possible, but what’s the point? After receiving the SVG file, this can be done in any vector editor afterwards.

The idea was to get hybrid results like the ones shown in the pictures. How useful that would be in practice is debatable.

There are areas in the images where nothing is rounded at all (the algorithm simply translates everything into rectangles), and it might also be possible for the algorithm to only partially round the corners of the rectangles themselves, which would also be an interesting option.

… So, perhaps I’m suggesting here the possibility of choosing a different conversion algorithm (as addons?.. and other filter addons from Inkscape?) for a different area of ​​the image. Well, if the same algorithm is not enough to perform such diverse tasks.

1 Like