Update server.js

This commit is contained in:
2025-12-29 19:40:05 -08:00
committed by GitHub
parent c6cbd7ece4
commit ead1efa698

View File

@@ -26,7 +26,8 @@ app.post("/convert", async (req, res) => {
const jpeg = await sharp(input, { failOnError: false }) const jpeg = await sharp(input, { failOnError: false })
.rotate() // respect EXIF orientation .rotate() // respect EXIF orientation
.jpeg({ quality: 85 }) // "Best quality" JPEG: max quality + 4:4:4 chroma (less color smearing)
.jpeg({ quality: 100, chromaSubsampling: "4:4:4" })
.toBuffer(); .toBuffer();
res.setHeader("Content-Type", "image/jpeg"); res.setHeader("Content-Type", "image/jpeg");