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

Re: [whatwg] canvas drawImage and EXIF orientation metadata

From: Justin Novosad <junov@google.com>
Date: Wed, 16 Apr 2014 09:54:24 -0700
Message-ID: <CABpaAqSWOZ+HyEAPc1mJgj=s5-SFTYPbZe=rFZrQv-h+yHdc6g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: whatwg <whatwg@lists.whatwg.org>
Another use case to think about is: XHR->Blob->ImageBitmap->Canvas(2D or
WebGL)
With that data flow, there is no opportunity to use a CSS property to tweak
image orientation.

There is this idea though: http://wiki.whatwg.org/wiki/ImageBitmap_Options

Boris' point about adding a dependency on style computation is concerning.
This could potentially seriously regress performance of existing apps that
(inadvertently?) invalidate style of image elements at each animation frame.

>From an implementation standpoint though, it would make sense for image
elements to to store decoded images with the corrected orientation
baked-in, and to be able to use that cached decoded image buffer directly
in drawImage, without having to re-apply (or even verify) orientation
correction at that time.  But of course, that implies resolving style at
image decode time.  What to do?



On Wed, Apr 16, 2014 at 8:15 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/16/14 11:09 AM, Anne van Kesteren wrote:
>
>> I don't really follow the reasoning. But I guess if this has been
>> shipping in Firefox for a while we might be out of luck changing this.
>>
>
> I doubt image-orientation is widely used, esp. in combination with
> drawImage.
>
> But if we want to use it here, we should coordinate with the CSS WG at
> least.
>
> -Boris
>
>
>
Received on Wednesday, 16 April 2014 16:54:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:28 UTC