W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2014

Re: [whatwg] CanvasRenderingContext2D and CSS Image filters

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 18 Sep 2014 11:32:02 -0700
Message-ID: <CAAWBYDBCYYsEc6OSzmiexfGbX43PKbe=rDe4zfzgMn-pjAbkag@mail.gmail.com>
To: Vivek Galatage <vivekg@chromium.org>
Cc: WHATWG List <whatwg@whatwg.org>
On Thu, Sep 18, 2014 at 11:15 AM, Vivek Galatage <vivekg@chromium.org> wrote:
> Hi all,
> I just wrote a test case which involves applying a CSS image filter
> (--webkit-filter or filter) using a grayscale filter.
> http://jsfiddle.net/whyn9075/
> With this image element, I used a canvas rendering context 2d to drawImage.
> Here is the link, http://imgur.com/7OgXEwp, to the screenshot of the
> behavior on chrome and FF.
> The question is: Should the filter even be applied to the bitmap drawn on
> the canvas?

CSS filters are a rendering-time operation.  They don't do anything to
the image data itself, which is what <canvas> uses when you call

Received on Thursday, 18 September 2014 18:32:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:23 UTC