Page MenuHomePhabricator

Raster image in an SVG not displayed (due to invalid MIME type "image/jpg")
Closed, InvalidPublic

Assigned To
None
Authored By
JoKalliauer
May 5 2018, 12:48 PM
Referenced Files
F34715590: Bildschirmfoto von 2021-10-29 22-43-12.png
Oct 29 2021, 8:53 PM
F34715583: White_Sea_map_hr_Inkscape.png
Oct 29 2021, 8:53 PM
F34715588: Bildschirmfoto von 2021-10-29 22-43-32.png
Oct 29 2021, 8:53 PM
F34715576: White_Sea_map_hr_librsvg24021.png
Oct 29 2021, 8:53 PM
F34715579: White_Sea_map_hr_librsvg.png
Oct 29 2021, 8:53 PM
F34715585: White_Sea_map_hr_batik.png
Oct 29 2021, 8:53 PM
F34715581: White_Sea_map_hr_rendersvg.png
Oct 29 2021, 8:53 PM
F34715593: Bildschirmfoto von 2021-10-29 22-42-42.png
Oct 29 2021, 8:53 PM
Tokens
"Heartbreak" token, awarded by Liuxinyu970226.

Description

The rasterimmage of
https://commons.wikimedia.org/wiki/File:Barents_Sea_map_hr.svg
does not render at all. (Version of 11:58, 5. Mai 2018)

How it is rendered

minO_nscos_.png (921×1 px, 64 KB)

How it should render

minO_nscos_2.png (921×1 px, 707 KB)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-W3CDTD SVG 1.1EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg viewBox="0 0 1200 1098" width="1200" height="1098" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image width="1200" height="1098" xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgF
[...]
[...]
[...]
/E0f8K78K/8AQtaR/wCAMX/xNaU6VOk7wjYXNc
2Q=="/>
</svg>

mistake found: (jpg instead of jpeg)
useses xlink:href="data:image/jpg;base64, instead of xlink:href="data:image/jpeg;base64,

Event Timeline

JoKalliauer renamed this task from raster immage in an svg not displayed to raster image in an svg not displayed.May 5 2018, 12:57 PM
JoKalliauer updated the task description. (Show Details)

data: should be followed with a MIME type.

"image/jpg" is not a valid MIME type, so this is not a bug and can be closed.

"image/jpeg" is the appropriate MIME type.

see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

either the MIME type is given or it defaults to "text/plain..."

MIME type defined:
https://www.iana.org/assignments/media-types/media-types.xhtml
does not define JPEG but links to
https://tools.ietf.org/html/rfc2046
which uses "image/jpeg"

Aklapper renamed this task from raster image in an svg not displayed to Raster image in an SVG not displayed (due to invalid MIME type "image/jpg").May 7 2018, 10:23 AM
Vvjjkkii renamed this task from Raster image in an SVG not displayed (due to invalid MIME type "image/jpg") to ekdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
JoKalliauer renamed this task from ekdaaaaaaa to Raster image in an SVG not displayed (due to invalid MIME type "image/jpg").Jul 1 2018, 7:22 AM
JoKalliauer closed this task as Invalid.
JoKalliauer lowered the priority of this task from High to Low.
JoKalliauer updated the task description. (Show Details)
JoKalliauer added a subscriber: Aklapper.

Rendering of https://upload.wikimedia.org/wikipedia/commons/archive/5/50/20211029200726%21White_Sea_map_hr.svg

c-librsvg2.40rust-librsvg2.52.3rendersvgInkscapebatikchromefirefox
White_Sea_map_hr_librsvg24021.png (934×1 px, 60 KB)
White_Sea_map_hr_librsvg.png (934×1 px, 60 KB)
White_Sea_map_hr_rendersvg.png (934×1 px, 609 KB)
White_Sea_map_hr_Inkscape.png (934×1 px, 522 KB)
White_Sea_map_hr_batik.png (934×1 px, 569 KB)
Bildschirmfoto von 2021-10-29 22-43-32.png (935×1 px, 517 KB)
Bildschirmfoto von 2021-10-29 22-43-12.png (933×1 px, 516 KB)

Bildschirmfoto von 2021-10-29 22-42-42.png (648×1 px, 303 KB)

librsvg and wxSVG are correct, the others (resvg,inkscape,batik,chrome,firefox,QtSVG) might violating the specifications by rendering the image but are more useful