xeyownt/xseticon

SVG support

thenoobtester opened this issue · 2 comments

Hi,

does this support svg image files? I tried and got a segmentation fault error, so I don't know if it's because I used a svg file or something else.

Thank you :)

Hello,

Unfortunately this doesn't work with SVG.

The code explicitly expects PNG and nothing else. It looks fairly easy to support some other bitmap formats, but there is no simple way I see to support SVG.

Your best bet then would be to first convert the SVG to PNG using ImageMagick (convert) or InkScape.
For instance, from https://stackoverflow.com/questions/9853325/how-to-convert-a-svg-to-a-png-with-imagemagick:

convert -size 1024x1024 test.svg test.png            # ImageMagick
inkscape -z -w 1024 -h 1024 input.svg -e output.png  # Inkscape
inkscape -w 1024 -h 1024 input.svg -o output.png     # InkScape 1.0

This Pull Request adds support to multiple image files including .svg