This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9329 - drawImage filtering when dx and dy aren't integers needs defined
Summary: drawImage filtering when dx and dy aren't integers needs defined
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-26 04:34 UTC by Sirisian
Modified: 2010-10-04 13:58 UTC (History)
4 users (show)

See Also:


Attachments

Description Sirisian 2010-03-26 04:34:13 UTC
I noticed that currently Firefox and Chrome draw things differently when given a dx and dy that are not integers. Firefox uses bilinear filtering and chrome uses nearest neighbor rounding the dx and dy values. This can be tested by rendering an image at 0.0, 0.1, etc to 1.0. There should probably be a defined operation that should occur or there should be a way to define which one the user wants. I prefer nearest neighbor, but I know not everyone likes pixel snapping.

Currently the only way to get similar behavior in both browsers is to wrap dx and dy in Math.round before passing them to drawImage, but that gets rid of the bilinear filtering that users might want.
Comment 1 Ian 'Hixie' Hickson 2010-04-02 06:16:55 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: This is a quality of implementation issue. There are many ways to handle this, such as using a higher-resolution backing store than the rendering needs, or using approximations, or shipping a higher-resolution monitor to the user. I do not think this is something the spec should mandate one way or the other.