GNOME Bugzilla – Bug 783867
svg image corrupt when .svg file opened in Windows version of Gimp
Last modified: 2017-10-17 20:08:08 UTC
Created attachment 353904 [details] Windows vs Linux svg image view issue When I open an svg file in the Windows 10 version of Gimp(v2.8.22), the image is all distorted. Yet when I open the image in a Linux version of Gimp(v2.8.1.6), the image is perfect. I have attached a side by side comparison screenshot jpeg image of the issue. It is exactly the same file, in the same disk location (A shared folder on a windows 10 host, with Ubuntu 16.04 LTS vm running on VirtualBox) that was opened.
Created attachment 353907 [details] The .svg file opened on the 2 systems This is the file that presented the issue. I have subsequently tested a number of files and many of them appeared distorted when opened using the Windows version of Gimp. but all were perfect in the Linux version of Gimp.
This is probably a problem in librsvg, the library used to read SVG. Maybe the version shipped with the Windows installer is older. Or simply it has Windows-only bugs. Anyway I confirm it opens fine on my GNU system (Fedora 25). Not tested under Windows.
Bug 620923 is present in librsvg 2.36.3, the version of librsvg-2-2.dll that comes with Windows GIMP (by way of mingw cross-compile on OpenSUSE). It wasn't fixed until after 2.40, when support for GTK+2 was removed. I assume this is why OpenSUSE mingw includes this old version. Ironically, substituting the 2.40.17 dll from mingw-w64.org works (at least for this svg file), and produces correct output. Compiling librsvg 2.36.3 from tarball and running './rsvg-convert -o baby_1.png baby_1.svg' generates identically scrambled output. Duplicate bug 747428 has a better description of what's going wrong. (Should Jernej know about this?) P.S. the attachment 353907 [details] 'baby_1.svg' should have MIME type 'image/svg+xml'. As 'image/gif' it doesn't load in any browser I tried.
(In reply to Edward E. from comment #3) > Bug 620923 is present in librsvg 2.36.3, the version of librsvg-2-2.dll that > comes with Windows GIMP (by way of mingw cross-compile on OpenSUSE). > It wasn't fixed until after 2.40, when support for GTK+2 was removed. I > assume this is why OpenSUSE mingw includes this old version. What is the GTK+ support in librsvg and is it a part we actually need (of course, we need both librsvg and GTK+, but do we need librsvg-with-GTK+-support, whatever that means?)? Here my build is based uses librsvg 2.40.16, and as far as I can tell, it works fine. Can't we simply fix this bug by bumping librsvg minimum requirement to 2.40? Or do I miss something? > Ironically, substituting the 2.40.17 dll from mingw-w64.org works (at least > for this svg file), and produces correct output. If there is no prebuilt package, the Windows packagers will just have to build it themselves. No big deal (compared to broken SVG support).
In master we can depend on librsvg 2.40.16, just go ahead and do that. For 2.8 we need to depend on the package builders to pick the right versions.
Done. I tracked down 2.40.6 being the first version shipping the fix. So that's our new minimum requirement on master. I did not understand your comment about 2.8. I am also able to build gimp-2-8 with a recent librsvg. Can't we just cherry-pick this new version requirement into 2.8? commit 662ca09e23ed385015705865cfabb346d8485ea7 Author: Jehan <jehan@girinstud.io> Date: Wed Jun 21 14:43:17 2017 +0200 Bug 783867 - svg image corrupt with librsvg < 2.40.6. Bump librsvg requirement to 2.40.6. This was bug 620923 in librsvg, fixed from 2.40.6 as of commit 5ba4343bccc7e1765f38f87490b3d6a3a500fde1 in their master branch. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Changing milestone to 2.8 since it is now fixed in 2.10. Now we just have to decide if we update the requirement in 2.8 as well.
No, we can never increase dependencies of a stable release, just ask people to upgrade their dependencies, or build binary packages with the better libs.
If you want to provide reminders, then file bug reports for the relevant components (i.e. Windows Installer and macOS DMG Package), set the 2.8 milestone and change the severity to Blocker.
Done. Cf. bugs 784066 and 784065.
*** Bug 751745 has been marked as a duplicate of this bug. ***