RE: Image rendering - telling the browser to TURN OFF anti-aliasing.

The image-rendering option doesn't do a thing, yet. (in FireFox ESR 31.4.0 or IE 11.0.9600.17633).

If, at some point, this has the effect of 'do nothing but affine transforms' then once its supported by all major browsers, We will be good.

<image x="100" y="200" width="300" height="150"  preserveAspectRatio="none" transform="translate(0,200) scale(1,-1) translate(0,-350)" 
 image-rendering="pixelated"
 xlink:href="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAIAAAACBAMAAACAmBAXAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA
D1BMVEUA/wAAAP///wD/AP/////EullKAAAAAWJLR0QEj2jZUQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAxJREFUCNdjYGRQBgAAKgAl05TghAAAACV0RVh0ZGF0ZTpj
cmVhdGUAMjAxNS0wMy0zMVQxMTozNToxMy0wNzowMObKsKIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTUtMDMtMzFUMTE6MzU6MTMtMDc6MDCXlwgeAAAAAElFTkSuQmCC
" />

Thomas

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Wednesday, March 25, 2015 14:48
To: Stephen Chenney
Cc: Smailus, Thomas O; www-svg
Subject: Re: Image rendering - telling the browser to TURN OFF anti-aliasing.

On Mon, Mar 23, 2015 at 11:10 AM, Stephen Chenney <schenney@chromium.org> wrote:
> Can you provide us with an svg file to test with? In theory the 
> various image-rendering CSS properties would be useful in this 
> context, but I don't know if they would influence SVG fill patterns. 
> It would be good if they did.
>
> https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering


Yeah, the existing image-rendering values <http://dev.w3.org/csswg/css-images/#the-image-rendering> already address this - set "image-rendering: pixelated;" and you'll be fine.

At least, per spec.  This should absolutely apply to fill patterns; they're equivalent to CSS background images, which this property definitely applies to.

~TJ

Received on Tuesday, 31 March 2015 19:13:20 UTC