Intent to deprecate and remove: BMP extension for decoding JPEG/PNG-embedded-in-BMP

37 views
Skip to first unread message

Łukasz Anforowicz

unread,
1:54 PM (3 hours ago) 1:54 PM
to blink-dev, fma...@google.com, kjlu...@google.com, Matthew Riley, Daniel Cheng, ser...@microsoft.com

Hello,


BMP image decoder that ships in Chromium/Blink is capable of decoding JPEG and/or PNG images embedded inside BMP (in addition to the typical RLE or other basic BMP encodings).  In https://chromestatus.com/feature/5153489630134272 we propose to remove this BMP extension, tracking this work with https://crbug.com/456842524.


Answering the questions from https://www.chromium.org/blink/launching-features/#feature-deprecations:

  • Why are we removing this feature?:

    • Security: Since 2019, we've been presented with compelling evidence that surprising and rarely-used support for nesting formats is a path to security bugs. Such a possibility is especially worrying for BMP, which is otherwise considered a pretty simple format.

    • Code health: Removing code is expected to improve code health.  Additionally, removing this corner-case will simplify migrating the BMP decoder to a memory-safe language.

    • Interoperability:

      • Removing this BMP extension will improve interoperability/consistency across browsers, because today only Chrome supports this BMP extension:

        • Manual testing of browser support is possible by visiting https://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html and looking at the result of rendering `q/rgb24jpeg.bmp` and `q/rgb24png.bmp`

        • Chrome 141.0.7390.134: rendered okay

          • Support for JPEG/PNG-in-BMP was added in 2019, in Chrome 78.0.3899.0

          • IIUC there was no Blink Intent for this addition + the main motivation was covering all files from the BMP test suite (I note that these 2 test inputs are in a “q” directory which was expanded to “questionable” when adding the test inputs to Chromium).

        • Firefox 143.0.4 and 144.0.2: not rendered

        • Safari 18.6: not rendered

      • There is no official spec:

  • What is the cost of removing this feature?

    • No usage has been registered via a recently added UMA data: https://crbug.com/452667935

      • UMA data gathered in https://crbug.com/452667935 for M143 shows no usage in Canary/Dev, Beta, not Stable release channels (not just minimal usage, but no usage whatsoever)

      • UMA data can have blind spots (users that do not enable UMA), but this seems like an acceptable risk

  • When will the feature be removed?

    • We propose to remove support for this BMP extension in Chrome 145 (which is tentatively scheduled to branch on January 12, 2026, and release to the Stable channel on Feb 10, 2026).

  • What is the suggested alternative?

    • Please use PNG and/or JPEG images **directly** rather than embedding them inside a BMP format.


Other notes:

  • We don’t plan to explicitly coordinate with other web rendering engines, because other browsers do not support this feature.

  • We don’t plan for a deprecation period, because there is no known usage (based on UMA) and explicit warnings (on Mozilla Developer Network) advise against using BMP in general, and this BMP extension specifically (calling it only “theoretically supported”)


Best regards,


Lukasz Anforowicz (on behalf of the Chrome Memory Safety and the Skia teams)

Reply all
Reply to author
Forward
0 new messages