GNOME Bugzilla – Bug 608102
Images without width and height attributes are rendered as one pixel
Last modified: 2010-04-08 11:56: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.
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.
*** This bug has been marked as a duplicate of bug 612951 ***
*** Bug 593396 has been marked as a duplicate of this bug. ***