Closed Bug 1003213 Opened 11 years ago Closed 11 years ago

Artifacts when displaying SVG as an image at certain sizes (flattened curves or "reflected" lines near border)

Categories

(Core :: SVG, defect)

29 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: si, Assigned: seth)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36 Steps to reproduce: http://codepen.io/calebbrewer/pen/DlHKk CopePen comes from: http://css-tricks.com/forums/topic/why-do-re-sized-svgs-in-image-tags-artifact-sometimes-in-firefox/ SO: http://stackoverflow.com/questions/21447705/svg-transform-scaling-text-to-very-small-causes-weird-overlap-effect Actual results: The SVG embedded img has Artifacts Expected results: The SVG embedded img should have no Artifacts
There's no text in the testcase. Please provide a testcase that demonstrates the issue.
Flags: needinfo?(si)
If you open the Codepen http://codepen.io/calebbrewer/pen/DlHKk and compare both SVG's (Same SVG, first as img second as object) you can see that the svg which is included as img has little artifacts on the bottom of the Letters "COFFEE". Is that enough text? Not sure what you need.
Flags: needinfo?(si)
The examples contain paths rather than text even though the stackoverflow article seems to be talking about text scaling so I'm confused about what this bug is about. Also I see no artifacts on the paths on the couple of Windows PCs I've tried. Perhaps attaching a screenshot might help.
Attached image artifacts.png
Here you can see the Artifacts. Left Side is the Problem i have, right side is the Codepen as seen on my Win 7 x64 machine. (Chrome and IE9 do display all 3 correct) Any yes, its the Path rendering not the SVG Text.
Comment on attachment 8415175 [details] artifacts.png Left Side is an SVG Sprite included via background-image:url(...)
Component: Untriaged → SVG
Product: Firefox → Core
Here is another example of that issue : https://github.com/tmos/greeder/issues/124 (Yes, we tried to deactive CSS, check SVG files integrity, and so on) It seems that the SVG viewport does not exactly fit the `img` tag one and for some reason the image is mirrored on the edges or cut. Sometimes you have to zoom in or out in order to see it. It's quite anoying not to be able to include properly SVG images in `img` tag since it's actually the only way to make it clickable (`object` tag does not allow linking according to this French reference : http://www.alsacreations.com/tuto/lire/1482-un-logo-cliquable-svg-avec-alternatives.html)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Difference in rendering an SVG as Object or IMG Tag → Artifacts (lines near border) when displaying SVG as an image
The artifacts only appear when the images size is a decimal number, i.e 77px * 77px is fine but 77.01px * 77.01px will be rendered incorrectly. Try here: http://jsbin.com/xanetehugeki/1/edit
Hmm, ok so the greatest errors occur at .5, .0001 and .9999 are almost perfect, it seems that the closer to a half the decimal is, the more noticeable the artifacts (Wish I could edit my last comment)
Summary: Artifacts (lines near border) when displaying SVG as an image → Artifacts when displaying SVG as an image at certain sizes (flattened curves or "reflected" lines near border)
This might be fixed by bug 1043560. needinfo=seth to confirm.
Flags: needinfo?(seth)
I've confirmed that this is fixed by bug 1043560.
Depends on: 1043560
Flags: needinfo?(seth)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → seth
Target Milestone: --- → mozilla34
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: