Skip to content

Codec Request: Jpegtran #64

Description

@jahed

Is your feature request related to a problem? Please describe.
I'd like to be able to optimise existing JPGs without re-encoding them and losing quality.

Describe the solution you'd like
jpegtran is a popular program to optimise JPGs. It's a part of libjpeg-turbo, so it's also available under mozjpeg. mozjpeg is already used in @jsquash/jpeg. So adding an optimise function export would make sense, similar to @jsquash/oxipng.

https://github.com/mozilla/mozjpeg/blob/master/jpegtran.c

jpegtran has a bunch of options, I typically use -optimize -copy none -progressive.

https://github.com/mozilla/mozjpeg/blob/master/jpegtran.1

Describe alternatives you've considered
jSquash is the only actively maintained library I've found that provides oxipng WASM builds with web browser support. It'd be perfect if it also provided a way to optimise JPGs. As far as I can tell, there's no actively maintained package for jpegtran WASM builds or any other package that can optimise JPGs like it can.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions