Skip to content

Feature request: JPEG decoding #513

@o-l-a-v

Description

@o-l-a-v

Got the idea from:

For more context: mozilla/standards-positions#522 (comment)

Regarding maintenance / code size / attack surface / binary size, I want to point out that potentially a JPEG XL decoder could also be used as a JPEG decoder (libjxl currently doesn't do that yet, but it does contain all the code needed to do that), which means the dependency that browsers have on libjpeg-turbo could potentially be dropped.
If the numbers from android chrome are an indication (see https://chromium-review.googlesource.com/c/chromium/src/+/2932498): libjpeg_turbo weighs in at 151 KiB, libjxl currently weighs in at 191 KiB, but plausibly libjpeg-turbo could be dropped and the jxl decoder could be used instead also for jpeg decoding, which brings the net binary size overhead down to ~40 KiB. So it does come at a cost in maintenance / code size / attack surface / binary size, but arguably the net cost is not huge, e.g. compared to libwebp (165 KiB), and probably quite comparable to the net cost of AVIF (i.e. implementing the HEIF functionality on top of an AV1 decoder that is and presumably will remain 'free' in the sense of 'available anyway').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions