Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/invoice_pdf/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const sharp = require('sharp');
// Path to the input image
const inputPath = 'play.png';
// Path to the output image
const outputPath = 'output.jpg';
sharp(inputPath)
.resize(300, 300) // Resize to 300x300 pixels
.toFormat('jpeg') // Convert to JPEG format
.jpeg({ quality: 80 }) // Set JPEG quality to 80
.toFile(outputPath) // Save the output image
.then(() => {
console.log('Image processed successfully.');
})
.catch(err => {
console.error('Error processing image:', err);
});
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0055 ]-- |