Repository navigation
Closed
Labels
focus-area-proposalFocus Area Proposal
Description
Description
Iron out the problems surrounding createImageBitmap.
Background
createImageBitmap has been around for a while, but the implementations has several flaws. Problems with image quality, EXIF handling, handling of color spaces, etc. These issues makes the API difficult to use in practice.
A few examples of use-cases for createImageBitmap:
- Take snapshots from a video feed
- Crop images on-device
- Resize images on-device before uploading to a server
- For example a photo from
<input type="file" capture="environment">. - On-device image resize has long been problematic, with the main workaround being the Canvas element, but every implementation I've seen has been buggy or hard to use, for example due to iOS canvas memory limits.
- For example a photo from
- Extract sprites from a sprite sheet
- Take non-rotated image pixels with an associated EXIF tag and output rotated pixels (without any EXIF), or put differently strip EXIF and apply rotation to image data.
- This is useful since many server-side systems prefer to handle all images without accompanying exif rotation data.
Problem
Copied below are a few examples of browser bugs. These are not the only issues, but should give a few examples.
I think if all the issues around this method could be ironed out, it would enable a lot of great utility! But right now, it isn't quite there.
Specification
Additional Signals
Can I Use
Browser bugs
A few examples from the three top browser engines:
Chromium
- https://issues.chromium.org/issues/41409681
- https://issues.chromium.org/issues/40773069
- https://issues.chromium.org/issues/41468523
- https://issues.chromium.org/issues/339759426
Firefox
- https://bugzilla.mozilla.org/show_bug.cgi?id=1677739
- https://bugzilla.mozilla.org/show_bug.cgi?id=1363861
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797567
- https://bugzilla.mozilla.org/show_bug.cgi?id=1189634
- https://bugzilla.mozilla.org/show_bug.cgi?id=1818824
Safari
- https://bugs.webkit.org/show_bug.cgi?id=202458
- https://bugs.webkit.org/show_bug.cgi?id=234920
- https://bugs.webkit.org/show_bug.cgi?id=237895
Reacted by Shalanah Dawson, Ahmad Saleem, Nir Lahad, Vladimir Agafonov, Justinas Delinda, Roderick Gadellaa, Ashley (Scirra), sandstrom, Izzuddin Natsir and Matthew Costello
Metadata
Metadata
Assignees
Labels
focus-area-proposalFocus Area Proposal
Type
Projects
- StatusShow more project fieldsDone
Activity
sandstrom commentedon Sep 22, 2024
Feel free to add more use-cases below.
AshleyScirra commentedon Oct 9, 2024
It would be great if the resizeQuality "high" worked properly in Chrome - currently it cannot do high-quality downscaling. This appears to have first been reported in 2017 here which was then merged in to this issue. I'm not sure how other browsers handle this but I believe needing high-quality downscaling is a common use case.
gsnedders commentedon Oct 11, 2024
https://wpt.fyi/results/html/canvas/element/manual/imagebitmap?label=master&label=experimental&aligned&q=createimagebitmap shows a certain number of failures, but I don't know if they cover all the bugs linked above.
[-]createImageBitmap[/-][+]window.createImageBitmap[/+]wpt-interop commentedon Feb 13, 2025
Thank you for proposing createImageBitmap for inclusion in Interop 2025.
We wanted to let you know that this proposal was not selected to be part of Interop this year.
On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.
For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.
Posted on behalf of the Interop team.
sandstrom commentedon Feb 14, 2025
@wpt-interop Thanks for the update!
Any feedback on whether this was partly considered, or things to clarify for a submission next year?
I'm not arguing against your choice, I know it's hard to prioritize.
But just trying to understand if it was a lack of interest, vendor veto, not considered in-scope for interop, or if the problem isn't described well enough?
foolip commentedon Feb 20, 2025
Hi @sandstrom! I have been going through comments on proposals after we launched last week, sorry it took a while to get to yours.
Details of the proposal selection process are confidential, but I can however give you my thoughts and feedback.
I don't believe there's any controversy about this area but more a question of priorities.
The proposal is well scoped and you've compiled a solid set of bugs and why they're important. Something that would make the proposal even stronger is an analysis of the existing tests, to confirm if they cover the bugs you're seeing or not. This isn't necessarily easy to do of course. If you'd like to propose this again in the future, you can just list what you know about the tests and also ask for help to figure out the details.
Additional evidence that a lot of developers are being impacted is also great, but similarly not easy to provide.
You can also push for these bugs outside of the Interop program, most bugs that are fixed aren't part of Interop after all. In the case of Chromium, using the +1 feature on the bug is a great way to signal that it matters, and you can see that the bug with the most +1's in your list is already fixed.
Hope that helps! I'll go ahead and close this issue now.
sandstrom commentedon Feb 20, 2025
Tack @foolip!
github-actions commentedon Dec 2, 2025
This comment was automatically generated based on the information you provided. Please don't edit it.
No web features (from the web-features project) were found in your proposal. If your proposal doesn't correspond to a web feature, that is fine.
Otherwise, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
sandstrom commentedon Sep 12, 2026
I've added a new proposal for this year: #1390
If you would also like to see easy and quick image resize, thumbnailing, cropping etc please upvote it with thumbs up.
sandstrom commentedon Sep 12, 2026
Hej @foolip! 🇸🇪
If you have any suggestions on how to strengthen my proposal for this year, please let me know! 💯
Tried to incorporate your feedback from above, about tests!