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 18783 - imageSmothingEnabled should not be associated strictly with image scaling
Summary: imageSmothingEnabled should not be associated strictly with image scaling
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 19:42 UTC by contributor
Modified: 2013-02-04 20:58 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-09-05 19:42:09 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Multipage: http://www.whatwg.org/C#image-smoothing
Complete: http://www.whatwg.org/c#image-smoothing

Comment:
imageSmothingEnabled should not be associated strictly with image scaling

Posted from: 2620:0:100c:0:cd41:eadb:836c:786d by junov@chromium.org
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1
Comment 1 Justin Novosad 2012-09-05 19:49:42 UTC
From the current description of imageSmoothingEnabled:
Returns whether pattern fills and the drawImage() method will attempt to smooth images if they have to rescale them (as opposed to just rendering the images with "big pixels"

The term "rescale" should probably be replaced with "resampled".  Image smoothing is pertinent for for rotations, sub-pixel translations, and other transforms.  Basically any type of transform that is not pixel-aligned.
Also, the comment in parenthis assumes magnification. Perhaps it should be more general: "as opposed to nearest neighbour filtering"
Comment 2 Ian 'Hixie' Hickson 2012-11-07 19:32:00 UTC
Justin: The text in question here is non-normative and is intended for authors who may not be graphics experts. Do you still think it should be changed?
Comment 3 Justin Novosad 2012-11-08 03:41:33 UTC
(In reply to comment #2)
> Justin: The text in question here is non-normative and is intended for
> authors who may not be graphics experts. Do you still think it should be
> changed?

I get your point. "resample" is a little too expert-ish. Nonetheless, the current text falsely suggests that smoothing is strictly related to scale. Even though it is non-normative, the description could be more accurate. I agree that the most prevalent use case for this feature is likely to be the "big pixel" look, but there is more to it than that.

Here is an alternate suggestion which I think would be clear to non graphics experts, but at the same time gives accurate information to implementors and to authors who are graphics experts:
Returns whether pattern fills and the drawImage() method will attempt to smooth images in cases where source image pixels don't line up one-for-one with canvas pixels. (as opposed to, for example, rendering enlarged images with "big pixels")
Comment 4 Ian 'Hixie' Hickson 2013-02-04 20:57:47 UTC
I've tried to make the text clearer, and dropped the mention of "big pixels". Let me know (and reopen this bug) if the text is inadequate now.
Comment 5 contributor 2013-02-04 20:58:02 UTC
Checked in as WHATWG revision r7691.
Check-in comment: Precision in the non-normative text. Hopefully people still understand what it means.
http://html5.org/tools/web-apps-tracker?from=7690&to=7691