Open Bug 952558 Opened 12 years ago Updated 3 years ago

drawImage changes color when not rounding number

Categories

(Core :: Graphics: Canvas2D, defect)

25 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: meyer.ant, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 Steps to reproduce: Uses drawImage to draw a canvas to another canvas by translating slices of 1px with floating-point precision. You can see the javascript here: http://jsfiddle.net/CW5hz/18/ Actual results: The color of the content of the initial canvas is altered when drawn on the second canvas. Expected results: The shape should be translated without color change. Notes: mozImageSmoothingEnabled set to false does reduce the floating-point precision to integer but the color still changes. The only way to have it keep its color is by forgetting about floating-point precision and Math.rounding dx in the snippet. (which we would like to avoid)
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
IE9 on win7 and IE11 on Win8.1 have a same behavior as Firefox.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.