Help converting SVG icon to Haiku (Icon-o-matic)

Hi. I’ve asked a friend to create an SVG icon for me for my video editor, but the SVG file cannot be opened properly with Icon-o-matic. I know nothing about SVG images, I’ve tried converting the icon with Inkscape, but it’s still not parsable by Icon-o-matic.

Is there anyone in the community who can help me convert the attached SVG icon to a Haiku .rsrc or .rdef file.


seem your icon too complicated… CMIIW

Have tried to create a own one? Here some tips:

Icon-O-Matic has some “arbitrary” limits on the number of shapes and paths you can have (this is to make sure the icon data remains small and can be stored in the “small attribute” section of the filesystem inode, making it loadable without extra hard disk seeks). You are possibly hitting some of these if the icon is not optimized enough, or maybe using some SVG features that Icon-O-Matic cannot handle.

I guess the IOM svg parser doesn’t understand CSS style, the shapes are parsed but everything is black, as the file exported to HVIF gets nice big I cleaned it up and simplified it, if you don’t mind having the original graphics but you are fine even a highly optimized file (the attribute only weighs 629 bytes), this is what I did


resource vector_icon array {

You guys are wonderful !!!

Thanka a lot zuMi.


A few NOTES on Haiku Icon development:

  • HVIF-based icons and HVIF Rdef - “As you can see, you wouldn’t really want to use HVIF to store generic vector graphics. It is really a format that is suited for a very special task only. But as was said before, it will turn out to be beneficial, ultimately in terms of desktop responsiveness. This won’t come automatically though. If icons are designed without knowledge of how HVIF works, then a lot of potential is wasted. For example, if vector path points are not snapped to integer pixels or if paths are not reused where they could be, then an icon can take much more space than it should. This is especially true if an SVG icon is imported into Icon-O-Matic and simply saved to HVIF as is. This is not such a good idea.

Some users are doing SVG->HVIF with import issues, so I’m referencing the warning message. HVIF has a icon limitation of 256 vector paths - so keep a vector icon’s vector path count (and style count) less than 256 - for SVG importing using Icon-o-Matic).

Note: I-O-M’s canvas is 64x64 pixels (limit of 1,024 pixels).

Can you explain to me how I can add a raster icon?
I tried with

 addattr -f path_of_raster_file -t icon BEOS:ICON path_of_file

The raw data is added but nothing is shown, I tried with BEOS:L:STD_ICON attribute but it’s the same, I thought it can show only bbitmap cmap8 but there is not a translator for it, how can I achieve that?

It’s not a BBitmap, but just the raw bytes of a 32x32 bitmap (exactly 1024 bytes), and no, there’s no translator for that. Your command seems correct so I guess the problem is in generating the data to feed to it?

yes, ‘translate’ can export to ‘bits’ but it’s a B_RGBA32, so there is no way to convert to B_CMPA8, at least from cli