Tutorial :PHP: Code to check image quality/pixelation (not compression rate but real quality)?



Question:

I want to know if its possible (and how) to check for real image quality (.jpg) using the GD library.

Obviously we need to check for file size, colors, image size, and number of pixels and compare between them.

For example if an 1200x600px image has a size of 60kb probably its in bad quality. But if the image is in grey scale, or uses only some colors, then maybe its in good quality...

So... any ideas?


Solution:1

What you want is a no-reference image quality assessment. I don't know of a specific implementation for PHP but you can take a look in IEEE Transactions on Image Processing for algorithms.

There's an implementation with focus on JPEG compression here:

http://www.cns.nyu.edu/~zwang/files/research/nr_jpeg_quality/index.html


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »