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 608102 - Images without width and height attributes are rendered as one pixel
Images without width and height attributes are rendered as one pixel
Status: RESOLVED DUPLICATE of bug 612951
Product: librsvg
Classification: Core
Component: general
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 593396 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-25 23:19 UTC by Gaz Davidson
Modified: 2010-04-08 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A simple example exported with Scour (749 bytes, image/svg+xml)
2010-01-25 23:19 UTC, Gaz Davidson
Details

Description Gaz Davidson 2010-01-25 23:19:38 UTC
Created attachment 152272 [details]
A simple example exported with Scour

Images without width and height attributes render as one pixel in EoG, GIMP and Nautilus. For example see "optimized SVG" exported from Inkscape, which contain a viewBox instead of width and height.

If no width or height are found, but a viewBox is then it's probably better to assume it's the width and height of the viewBox. This works for me in test cases like the one attached, though I don't know how legal this is as I've not read the SVG format spec.
Comment 1 Jeff Schiller 2010-01-26 01:34:04 UTC
The SVG spec says the following:

- if width/height are not specified, their default value is 100%/100%

<svg viewBox="0 0 400 300">...</svg>

The right thing to do would be to stretch the image to the extents of the viewer's current dimensions.  There are other things to look at too (preserveAspectRatio attribute).

In the following:

<svg viewBox="0 0 400 300" width="800" height="600">...</svg>

The right thing to do would be to fix the size of the image at 800x600.

This would seem to bump up against bug 108435 so not sure that this is a duplicate or not.
Comment 2 Hiroyuki Ikezoe 2010-04-05 10:58:47 UTC

*** This bug has been marked as a duplicate of bug 612951 ***
Comment 3 Hiroyuki Ikezoe 2010-04-08 11:56:38 UTC
*** Bug 593396 has been marked as a duplicate of this bug. ***