Closed
Bug 647485
Opened 14 years ago
Closed 14 years ago
canvas drawImage rasterizes SVG first and scales after
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 603488
People
(Reporter: evik.gm, Unassigned)
Details
(Keywords: testcase)
Attachments
(2 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Build Identifier: Firefox 4.0
I have an img element which has an SVG file as source. Changing the width and height of the image element scales the drawing smooth. If I want to draw that image to a canvas, it will rasterize the SVG in its given dimensions (given in the SVG tag) and then scale the rasterized image to the desired dimensions which results an ugly drawing. IE9, Chrome10 and Safari5 all renders the SVG to the desired dimensions and puts it into the canvas resulting in a smooth image.
Reproducible: Always
Steps to Reproduce:
1. drawImage an image element with SVG src to the canvas with a scale other then 1:1
2.
3.
Actual Results:
The SVG is rasterized in its "natural" size (given in the SVG tag, not even related to the Image element containing it) and then scales to the dimensions given in drawImage.
Expected Results:
The SVG should be rasterized to the dimensions given in the drawImage parameters to ensure smooth scaling.
Component: General → Canvas: 2D
Product: Firefox → Core
QA Contact: general → canvas.2d
Version: 4.0 Branch → Trunk
Corrected to refer to svg attachment
Attachment #523823 -
Attachment is obsolete: true
Comment 4•14 years ago
|
||
Presumably the issue is that we try to get an image surface out of the <svg> and the draw+scale that....
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•14 years ago
|
||
Precisely. See bug 603488.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•