Closed gzagatti closed 7 months ago
I am using graphicsmagick to load SVGs.
Maybe I should consider using librsvg
directly for SVG files...
Alright, confirmed that librsvg can read the file in question. Will add this to timg soon.
Thanks for the quick response. I had no idea about these different libraries. Glad that the solution is kind of simple.
I've added a dedicated renderer for SVG based on the rsvg library. This should now result in much higher quality renderings of SVGs (currently works well for the high-resolution image output of timg, not yet the timg 'block-graphics' outputs).
I confirmed that it can render the test image you mentioned. The default rendering takes the size-hints coming from the image, but using the -U
option of timg
, it also losslessly scales it up to fit into the available space.
This will be in the next release, but if you want to try it now, compile timg
from head or use the
AppImage timg-v1.5.3-9-x86_64.AppImage.
The latest release now includes this improved renderer: https://github.com/hzeller/timg/releases/tag/v1.6.0
Thanks so much! I have recently updated timg and it can now display svg images correctly.
There are some svg files that cannot be displayed by timg. The SVG file from the SVG Wiki page is one of them.
I have found this issue when using some svg compression tools like svgo and scour. It happens that I can display the svg file with timg before optimization but not after.
Any idea of what might be going on?