skip to Main Content

How to get JPG file length in bytes AFTER resizing and compressing the image with Imagick in PHP?

I have the following code: $im = new Imagick($original_image_filename); $original_width = $im->getImageWidth(); $original_height = $im->getImageHeight(); $original_length = $im->getImageLength(); if($original_width > 300) { $im->scaleImage(300, 0); // max size for images is 300px wide } $scaled_width = $im->getImageWidth(); $scaled_height = $im->getImageHeight(); $scaled_length…

VIEW QUESTION
Back To Top
Search