jimp-dev/jimp

Setting lower quality increases the file size

Open

Aperta il 2 giu 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (13.218 star) (785 fork)batch import
bugfile size issuehelp wanted

Descrizione

Expected Behavior

Decrease the file size with decrement in image quality.

Current Behavior

Increase the file size with decrement in image quality.

Code

jimp.read("./forest-patrol.jpg", (err, lenna) => {
  if (err) throw err;
  lenna
    .quality(60) // set JPEG quality
    .write("./forest-patrol-jimp-mini.jpg"); // save
});

bug-report Here, we can see that original image forest-patrol.jpg is smaller than the processed image forest-patrol-jimp.jpg

Guida contributor