createImageBitmap() does not support resize options (resizeQuality remains)
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: vitaly, Unassigned)
References
Details
(Keywords: dev-doc-needed)
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.
Updated•7 years ago
|
Comment 2•7 years ago
|
||
What other browsers support resizeWidth etc?
Reporter | ||
Comment 3•7 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•7 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 5•2 years ago
|
||
It doesn't look like this was ever resolved. The linked tickets (https://bugzilla.mozilla.org/show_bug.cgi?id=1335594, https://bugzilla.mozilla.org/show_bug.cgi?id=1367251) did add support for some createImageBitmap() options, but support for resize options (resizeWidth, resizeHeight, and resizeQuality) was never added, as far as I can tell.
Comment 6•2 years ago
|
||
Fair enough, let's keep this open then.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Bug 1733559 added support for resizeWidth and resizeHeight.
Comment 8•2 years ago
|
||
Thanks Tom! Not sure how high priority resizeQuality
is, but if it's relatively straightforward we should probably do it.
We have some real-world use-cases for this (currently using canvas + math, but would prefer to use this when it's landed).
I'd say image quality (resizeQuality) matter a lot in practice, for example to tune image size and thereby upload size / upload time. Obviously this is anecdotal, but I think it's highly useful.
Great that resizeWidth and resizeHeight is now supported!
Updated•2 years ago
|
Description
•