By default, the SVG images are not always handled by every application under Haiku.
I decided to write this article to explain how to manage easily the SVG format in order to use its power :)
If you want to better handle SVG, my first advice is to install the Nano SVG Translator.
In a Terminal type :
pkgman install nanosvgtranslator
Now, launch in the "Preferences > DataTranslations" application :
You should see the below SVG translator available :
For all native applications which rely on the DataTranslator, the SVG format will now be recognized :)
Let's verify it with the "notify" command launched in a Terminal :
notify --type information --title "Notification" --icon /system/data/icons/haiku/categories/32/applications-internet.svg "The SVG format is really powerful!"
As you can see, the notification message is using the nice SVG icon provided :
Now that we have some SVG icons available in the system, what about converting them to another format like PNG?
For that there's a command named "rsvg-convert" which let you convert your image to this format.
Let's suppose we need to convert the previous "applications-internet.svg" image.
To have the command help, launch a Terminal and type :
rsvg-convert --help
Now let's convert the SVG image to the PNG format with a height of 256 pixels :
rsvg-convert -h 256 /boot/system/data/icons/haiku/categories/32/applications-internet.svg >$HOME/Desktop/applications-internet.png
Check the format :
file $HOME/Desktop/applications-internet.png
Yes this is now a PNG file !
If you double click on it on the desktop, ShowImage will display it as a PNG image :
Do you use regularly the SVG format under Haiku ?
Let's share your experience in the comments below :)