Primary eng (and PM) emails
Spec
http://dev.w3.org/csswg/css-images/#the-image-rendering
Summary
Implement the "image-rendering: pixelated" property. This indicates that the algorithm used to scale the image should be nearest-neighbor.
Motivation
This enables high performance UI for image editing applications. In order to support zooming, these applications will typically redraw the image data to another canvas at the required scale. This involves either redrawing the entire image frequently or hooking into scroll events to redraw parts of the image, both of which are prone to jank. Adding this feature will improve performance and decrease complexity and memory usage for this class of applications.
Compatibility Risk
This is supported on other browsers in the following forms:
Firefox: "image-rendering: -moz-crisp-edges"
Webkit: "image-rendering: -webkit-optimize-contrast"
IE: "-ms-interpolation-mode: nearest-neighbor"
Ongoing technical constraints
None.
Will this feature be supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Yes.
OWP launch tracking bug?
None
Row on feature dashboard?
No
Requesting approval to ship?
No
Other
I'm not familiar with working in blink, so it would be ideal if someone with more experience in this area is interested in taking this on. That said, I'm happy to implement it if necessary.
It was proposed in CSS3 with the values 'optimizeSpeed' and 'optimizeQuality', but was moved to CSS4 with new values 'auto', 'crisp-edges', and 'pixelated'.Webkit went with 'optimizeQuality', '-webkit-crisp-edges', and '-webkit-optimize-contrast':Firefox has a bug for supporting 'pixelated':But it seems from the documentation that '-moz-crisp-edges' does the same thing:
I'm not fussed about what it's called. It probably makes sense to put it behind a prefix until it's finalized.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Is this purely for <img> or will it work with other elements such as <canvas>? (e.g., http://stackoverflow.com/questions/7615009/disable-interpolation-when-scaling-a-canvas)
If you create an image editing application, wouldn't you want to draw your UI controls and selection areas non-pixelated?In addition, Canvas is very fast at scrolling (see all the canvas games) so I don't understand why doing a drawImage with 'imageSmoothingEnabled = false' would cause jank.
Implementations usually just have the choice between nearest-neighbor, bilinear and bicubic interpolations. These terms are actually well known. I am not sure if ‘pixelated’ is really the best term to describe nearest-neighbor. As a consequence, crisp-deges is usually implemented with nearest-neigbors as well. I do not see a reason to keep both keywords. And I don’t think pixelation is the right term to use.
~TJ
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.