@gallop.software/studio 2.3.122 → 2.3.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4504,13 +4504,13 @@ async function handleEditImage(request) {
4504
4504
  const ext = path10.extname(imagePath).toLowerCase();
4505
4505
  let finalBuffer;
4506
4506
  if (ext === ".png") {
4507
- finalBuffer = await pipeline.png({ quality: 85 }).toBuffer();
4507
+ finalBuffer = await pipeline.png({ compressionLevel: 9 }).toBuffer();
4508
4508
  } else if (ext === ".webp") {
4509
- finalBuffer = await pipeline.webp({ quality: 85 }).toBuffer();
4509
+ finalBuffer = await pipeline.webp({ quality: 95, lossless: false }).toBuffer();
4510
4510
  } else if (ext === ".gif") {
4511
4511
  finalBuffer = await pipeline.gif().toBuffer();
4512
4512
  } else {
4513
- finalBuffer = await pipeline.jpeg({ quality: 85 }).toBuffer();
4513
+ finalBuffer = await pipeline.jpeg({ quality: 95, mozjpeg: true }).toBuffer();
4514
4514
  }
4515
4515
  const finalMeta = await sharp7(finalBuffer).metadata();
4516
4516
  const finalWidth = finalMeta.width || resize.width;