createImageBitmap() does not support resize options

NEW
Unassigned

Status

()

2 years ago
5 days ago

People

(Reporter: vitaly, Unassigned)

Tracking

({dev-doc-needed})

53 Branch
dev-doc-needed
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170418123818

Steps to reproduce:

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap


let c = document.createElement('canvas');
c.width = 100;
c.height = 100;

createImageBitmap(c, 0, 0, 100, 100, {
  resizeWidth: 10,
  resizeHeight: 10,
  resizeQuality: 'high'
})
.then(bitmap => {
  console.log((bitmap.width === 10) ? 'supported' : 'not supported'
});

// => not supported

Options { resizeWidth, resizeHeight, resizeQuality } are not supported now.


Actual results:

createImageBitmap() does not change result size when  { resizeWidth, resizeHeight } options passed.


Expected results:

Expect downscaled result.
Component: Untriaged → DOM
Product: Firefox → Core
Canvas:2D seems a better fit ... I guess...
Component: DOM → Canvas: 2D
What other browsers support resizeWidth etc?
(Reporter)

Comment 3

2 years ago
Chromium with enabled chrome://flags/#enable-experimental-canvas-features flag has support, but it still has problems with quality https://bugs.chromium.org/p/chromium/issues/detail?id=712844

Updated

a year ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.