Skip to content

Use an optimized JPEG encoder (MozJPEG ?) for JPEG and PDF output #83

@nekohayo

Description

@nekohayo

Hi!

I am assuming (and also from not seeing a mention of "mozjpeg" when doing git grep -i jpeg on your repository) that FairScan is using the default JPEG encoder, which is probably not MozJPEG, right?

Until we can use JXL in PDF someday, I would like to suggest at least using MozJPEG to encode everything with much smaller filesizes for the same quality and same encoding speed. Basically the same idea as https://gitlab.com/adhami3310/Switcheroo/-/issues/29

MozJPEG is a drop-in replacement for libjpeg, backwards/forwards compatible etc.

The filesize savings are quite significant (at least for photographs), as you can see with the sample I shared in #72 :

Image

Or you can see for yourself by comparing/testing various codecs with this web interface: https://squoosh.app

It would be very cool to also offer JXL as an option today, but I'd understand if you prefer to wait for it to be part of the PDF standard too (?). In both cases, you would be able to proudly mention support for those modern codecs in the README file :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions