Re: [css-color] Feedback on the image-orientation CSS property

On Thu, Apr 17, 2014 at 10:39 AM, fantasai <fantasai.lists@inkedblade.net>wrote:

> On 04/16/2014 12:21 PM, Justin Novosad wrote:
>
>> Hi,
>>
>> In this discussion thread, concerns were raised regarding whether
>> image-orientation should be a CSS property:
>> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-
>> April/254148.html
>>
>> tl;dr:
>>
>>   * Property should be move to markup: it is more semantic than
>> stylistic. Image orientation affects the content.
>>   * It would be desirable to take image orientation into account when
>> drawing an image to 2D canvas or WebGL. If orientation
>>
>>     is expressed by a CSS property, that would imply making canvas draws
>> dependent on style computation.
>>
>> Thoughts?
>>
>
> I agree that it belongs more in markup. The reasons for it
> being in CSS are largely historical: it was initiated by
> the print industry way back for handling photo printing
> and was implemented as part of the Paged Media module. We
> moved it out once we had an Images module, which seemed
> like a more appropriate place to put it.
>
> I have no problem with deprecating it in CSS.


IMHO, the main argument for moving it to markup is that interpreting
orientation meta-data has to do with content decoding. Since we have use
cases for consuming the decoded image data that are not tied to the
presentation of the HTML element, decoding should remain independent of
style.  The performance implication is significant if we want 2d canvas and
WebGL to take this parameter into account. If this stays a CSS property
then making CanvasRenderingContext2D.drawImage dependent on style
computation could regress the performance of existing web apps, due to
dramatically increased style recalc frequencies (that could be worked
around in JS, but still...)

I agree that just two settings are necessary (from-image, none) all other
values are redundant with CSS transforms.

Not sure I understand Tab's suggestion of having it both in markup and CSS.
 Does one override the other? Could canvas.drawImage only depend on the
HTML attribute and not on CSS (to avoid depending on style computation?)

     -Justin


>
> ~fantasai
>

Received on Thursday, 17 April 2014 18:08:08 UTC