createImageBitmap fails when providing options object

NEW
Unassigned

Status

()

defect
P3
normal
2 years ago
a month ago

People

(Reporter: the.spite, Unassigned)

Tracking

({dev-doc-needed})

51 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36
Firefox for Android

Steps to reproduce:

- Open https://www.clicktorelease.com/tmp/texImage2D/ on Firefox 51 or later
- Click on the option called "ImageBitmap, UNPACK_FLIP_Y_WEBGL false, imageOrientation flipY and no dimensions"

Code is also on https://github.com/spite/texImage2D


Actual results:

This performs the call
createImageBitmap( image, { imageOrientation: 'flipY' } )

Fails with "TypeError: Not enough arguments to Window.createImageBitmap."


Expected results:

It should work, like other versions of the code that use the signature
createImageBitmap( image, x, y, w, h, options );

Chrome accepts the function signature, and MDN lists is as an accepted one.

Updated

2 years ago
Component: Untriaged → Canvas: 2D
Product: Firefox → Core

Comment 1

2 years ago
Supporting this options dictionary is important for developers wishing to upload ImageBitmap objects to WebGL.
Priority: -- → P3
Whiteboard: [gfx-noted]
(Reporter)

Comment 2

2 years ago
Any updates on this? 

This issue makes the method useless in Firefox if the texture needs to be flipped vertically, since it requires to know the width and height beforehand.

Comment 3

2 years ago
I confirm this bug, have the same problem.
I've modified the example from Jaime to just activate the exact behaviour described on the bug.
I've also added an image with the expected result versus the current one for easy comparison.
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1367251

Comment 7

2 years ago
We also need this call to be available at Figma.  It would be good to update the support info in the documentation also.

Updated

a year ago
Keywords: dev-doc-needed
I can also confirm this problem and it prevents us from optimizing our image pipeline.

Comment 9

8 months ago
Please give this issue a higher priority. When rendering with WebGL in a worker, ImageBitmap becomes even more important since loading images via HTMLImageElement does not work (because it's a DOM interface).

I can confirm this is still an issue. Is there any way this ticket can be given a higher priority?

You need to log in before you can comment on or make changes to this bug.