yoga icon indicating copy to clipboard operation
yoga copied to clipboard

JPEG → JPEG optimization: keep the original image if the output image is bigger than the input one

Open flozz opened this issue 1 year ago • 0 comments

When doing a JPEG to JPEG optimization, we should never have an output image bigger than the input one.

  • If the guetzli+mozjpeg reencoding produce a smaller image → keep it
  • else, try a mozjpeg (lossless) optimization alone, and if it produces a smaller image → keep this one
  • else, just remove metadata and keep the original encoding.

Issue #43 must be resolved before this one

Related issue: https://github.com/flozz/yoga-image-optimizer/issues/14

flozz avatar Sep 22 '22 12:09 flozz