Comparing Imagick a PHP image plugin JPG image file compression from 1 (lowest) through to 100.
The original image was 1MB and the code used to do this test was:
readImage("ogimage.jpg"); $im->setImageCompression(Imagick::COMPRESSION_JPEG); $im->setImageCompressionQuality($i); $im->setImageFormat("jpg"); $im->stripImage(); $im->writeImage("output/$i.jpg"); $im->destroy(); echo "$i is done
"; }
The compressed file sizes:
Quality 64 is actually when the file size starts to drop, whilst 77 through to 100 add-on size. Quality 1 through to 20 has discoloration and obvious pixels.
The original image:
Quality 64
Quality 50
Quality 30
Quality 20
Quality 1
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…