Skip to content

window.createImageBitmap #731

Closed
Closed

Description

@sandstrom

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.
  • 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

https://html.spec.whatwg.org/dev/imagebitmap-and-animations.html

Additional Signals

Can I Use

https://caniuse.com/createimagebitmap

Browser bugs

A few examples from the three top browser engines:

Chromium
Firefox
Safari

Activity

  1. sandstrom commented on Sep 22, 2024

    @sandstrom
    Author

    Feel free to add more use-cases below.

  2. AshleyScirra commented on Oct 9, 2024

    @AshleyScirra

    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.

  3. gsnedders commented on Oct 11, 2024

    @gsnedders
    Member
  4. changed the title [-]createImageBitmap[/-] [+]window.createImageBitmap[/+] on Jan 17, 2025
  5. wpt-interop commented on Feb 13, 2025

    @wpt-interop
    Collaborator

    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.

  6. sandstrom commented on Feb 14, 2025

    @sandstrom
    Author

    @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?

  7. foolip commented on Feb 20, 2025

    @foolip
    Member

    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.

  8. sandstrom commented on Feb 20, 2025

    @sandstrom
    Author

    Tack @foolip!

  9. github-actions commented on Dec 2, 2025

    @github-actions

    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.

  10. sandstrom commented on Sep 12, 2026

    @sandstrom
    Author

    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.

  11. sandstrom commented on Sep 12, 2026

    @sandstrom
    Author

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions