Invalid svg to png conversion via rsvg in mediawiki

388 Views Asked by At

While uploading this file to my wiki instance, application uses librsvg to convert it into png thumbnails. But the result is like this Link

This dragon seems to be generated in Inkscape, so i tried to use inkscape as a converter. It worked for this image (but not for some others), but it has X dependencies, so I cannot use it.

Here I found, that wikimedia projects use rsvg for such conversions.

Can anyone help me with this strange behavior?

Mediawiki settings for svg support:

# Svg support
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'rsvg';

Environment:

CentOS release 5.6 (Final)
rsvg version 2.16.1
2

There are 2 best solutions below

0
On BEST ANSWER

The answer is damn simple — librsvg library was too old. 2.22.3+ solves this issue.

1
On

rsvg has a number of issues, please file a bug and mark it as blocker of https://bugzilla.wikimedia.org/show_bug.cgi?id=8901 . It might already be in the list of known bugs, check.