Skip to content

Add createImageBitMaps's imageOrientation "none" #8085

Open
@zcorpan

Description

@zcorpan

If it's web compatible, consider renaming the imageOrientation value "none" to "from-image" to match CSS's image-orientation property (and make it the default value), and add a new "none" that has the same semantics as CSS's none.

[...] CreateImageBitmap has an imageOrientation option. Unfortunately that spec and the CSS images level 3 spec were written without knowledge of each other, so we are in this awkward situation where passing {imageOrientation: "none"} to createImageBitmap is equivalent to {image-orientation: from-image} in CSS. createImageBitmap does not currently have an option that is equivalent to CSS's {image-orientation: none}, but it would be pretty easy to add that.

Before moving forward, I would like to add instrumentation to chromium to measure whether anyone is using {ImageOrientation: "none"} explicitly with createImageBitmap. If not, we could change the createImageBitmap spec to match the CSS semantics and change the default to "from-image", which would avoid breaking backwards compat for call sites that use the default.
[...]

Originally posted by @junov in #4495 (comment)

cc @whatwg/canvas

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions