After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783867 - svg image corrupt when .svg file opened in Windows version of Gimp
svg image corrupt when .svg file opened in Windows version of Gimp
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Windows Installer
2.8.22
Other Windows
: Normal normal
: 2.10
Assigned To: GIMP Bugs
Jernej Simončič
: 751745 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-06-16 17:08 UTC by Duane Scott
Modified: 2017-10-17 20:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Windows vs Linux svg image view issue (8.68 KB, image/jpeg)
2017-06-16 17:08 UTC, Duane Scott
Details
The .svg file opened on the 2 systems (2.29 KB, image/gif)
2017-06-16 17:15 UTC, Duane Scott
Details

Description Duane Scott 2017-06-16 17:08:36 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.
Comment 1 Duane Scott 2017-06-16 17:15:54 UTC
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.
Comment 2 Jehan 2017-06-16 22:54:01 UTC
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.
Comment 3 Edward E. 2017-06-17 17:31:56 UTC
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.
Comment 4 Jehan 2017-06-21 11:21:19 UTC
(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).
Comment 5 Michael Natterer 2017-06-21 12:36:16 UTC
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.
Comment 6 Jehan 2017-06-21 13:58:40 UTC
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(-)
Comment 7 Jehan 2017-06-21 19:24:02 UTC
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.
Comment 8 Michael Natterer 2017-06-21 21:42:06 UTC
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.
Comment 9 Michael Schumacher 2017-06-21 21:50:30 UTC
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.
Comment 10 Jehan 2017-06-21 22:05:20 UTC
Done.
Cf. bugs 784066 and 784065.
Comment 11 Michael Schumacher 2017-10-17 20:08:08 UTC
*** Bug 751745 has been marked as a duplicate of this bug. ***