after resize the image is even more big

$image = new \Phalcon\Image\Adapter\Imagick("test.jpg");

$image->resize(800, 600);

$image->save();


picture 1:

before resize: 66K (1024 * 520)

after resize: 75K (800 * 406)


picture 2:

before resize: 218K (1920 * 1285)

after resize: 338K (800 * 535)

Do i miss something ?



30.0k
edited Sep '15

Hi,

if your on linux; try

sh# convert rose.jpg -resize 800x600 rose.png

this is the command used by ImageMagick to resize images. See if the same happens ...

before resize: 218K (1920 * 1285)

after resize: 38K (800 * 535)

perfect in the command line


what is wrong ?

Hi,

if your on linux; try

sh# convert rose.jpg -resize 800x600 rose.png

this is the command used by ImageMagick to resize images. See if the same happens ...

http://php.net/manual/en/book.imagick.php

$im = new Imagick("test.jpg");

$im->thumbnailImage(800, 600, true);

$im->writeImage("thumb.jpg");


the result is almost the same as the command "convert test.jpg -resize 800x600 thumb.jpg"

so, please check about the phalcon imagick class, maybe this is a bug.



223

Looks like an bug

function adaptiveResizeImage($imagePath, $width, $height, $bestFit) { $imagick = new \Imagick(realpath($imagePath)); $imagick->adaptiveResizeImage($width, $height, $bestFit); header("Content-Type: image/jpg"); echo $imagick->getImageBlob(); }


Cheap Essay Writing Service

where can I see the "adaptiveResizeImage" function ?

Looks like an bug

function adaptiveResizeImage($imagePath, $width, $height, $bestFit) { $imagick = new \Imagick(realpath($imagePath)); $imagick->adaptiveResizeImage($width, $height, $bestFit); header("Content-Type: image/jpg"); echo $imagick->getImageBlob(); }