Large thumnail size for tiny image created with Imagick->resize()

397 Views Asked by At

Ok, I have a simple PHP script, that generates a thumbnail for a large picture using Imagick PHP extension.

The simplified script is:

$this->image = new Imagick ();
$this->image->readImage($origFileName);

$this->image->resizeImage(76, 50, Imagick::FILTER_CATROM, $this->blur);
$this->image->contrastImage( 1 );
$this->image->sharpenimage( 0.8, 0.6);

$this->image->setImageCompression(imagick::COMPRESSION_JPEG);
$this->image->setImageCompressionQuality(1); // REALLY strong JPEG compression

The resulting image is quite ugly (of course it is!): http://dl.dropbox.com/u/16514036/thumbnail.php.jpg

But look at the size - it is 28 KB! Crap, what?!

As far as I understand the problem is in metadata or embed preview from Photoshop.

So the question is - how can I optimize thumbnail and remove all obsolete data from it?

1

There are 1 best solutions below

0
On BEST ANSWER