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 739682 - doesn't recognize mime type image/jpg
doesn't recognize mime type image/jpg
Status: RESOLVED NOTGNOME
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-05 19:16 UTC by FoddyZip348
Modified: 2015-04-06 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description FoddyZip348 2014-11-05 19:16:03 UTC
Had this problem at at Wikipedia. I'm assuming the issue is yours rather than theirs. When librsvg rasterizes an SVG with an embedded JPG, if the mime type of that embedded image is "image/jpg" the embedded image simply doesn't render. If however the mime type is "image/jpeg", everything works fine.

Below are two examples. The first is normal. The second is broken.

https://commons.wikimedia.org/wiki/File:Missing_embedded_JPG_example_1.svg

https://commons.wikimedia.org/wiki/File:Missing_embedded_JPG_example_2.svg
Comment 1 FoddyZip348 2014-11-06 02:45:17 UTC
Thought I'd mention (apologies if this is common knowledge) that MediaWiki uses the librsvg library to rasterize SVG images into PNGs.
Comment 2 Bakhtiar Hasmanan 2015-04-02 09:40:06 UTC
This is because Windows registry do not contain image/jpg
See HKCR\MIME\Database\ContentType

There are many problem caused by this especially when called by g_content_type_from_mime_type() I also have several bugreports because of that too.

I think the function need some kind of fallback on Windows...
Comment 3 Bakhtiar Hasmanan 2015-04-02 10:00:46 UTC
Or could be because gdk-pixbuf doesn't register image/jpg (just image/jpeg) mime but that would affect linux too. I don't see g_content_type_from_mime_type in rsvg though, sorry.
Comment 4 Matthias Clasen 2015-04-02 12:44:38 UTC
Well, the mime type for jpeg is image/jpeg. Wikipedia should use the correct mime types.
Comment 5 Olav Vitters 2015-04-03 10:42:04 UTC
https://en.wikipedia.org/wiki/Wikipedia:SVG_help#Missing_embedded_JPG_images

'Older versions of Inkscape (and possibly others) assigned the MIME type "image/jpg".'
Comment 6 Bakhtiar Hasmanan 2015-04-03 11:32:44 UTC
BTW I can confirm adding image/jpg in gdk-pixbuf/io-jpeg.c and gdk-pixbuf/io-gdip-jpeg will solve the problem. 

Under windows, IE also have bizarre alias called image/pjpeg for progressive jpeg. Though I doubt it widely recognized.
Comment 7 Bakhtiar Hasmanan 2015-04-03 11:37:56 UTC
BTW I can confirm that adding "image/jpg" in gdk-pixbuf/io-jpeg.c and gdk-pixbuf/io-gdip-jpeg will solve the problem. 

Under windows, IE also have bizarre alias called image/pjpeg for progressive jpeg. Though I doubt it widely recognized.
Comment 8 Matthias Clasen 2015-04-06 12:06:17 UTC
I consider this a wikipedia issue. They are serving invalid svg files...