Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resized image becomes blurry #449

Open
aykutcan opened this issue Oct 29, 2015 · 1 comment
Open

Resized image becomes blurry #449

aykutcan opened this issue Oct 29, 2015 · 1 comment

Comments

@aykutcan
Copy link

Hi.

I m working on a project that needs cropping, and resizing many times.

My main image size is 1000 x 400 px. When input is larger; i crop input image to 1000x400.
then resize it into 4 or 5 variations. im encoding input images to jpeg.

Problem is when i crop bigger picture its fine. When i resize cropped picture it becomes blurry.

For example
http://www.gereksiz.org/4189.jpg -> its Perfectly fine (1000x400)
http://www.gereksiz.org/4189-yatay.jpg -> Resized version. Blurry. (450x180)

im using

ImageMagick 6.7.2-7 2015-07-23 Q16 http://www.imagemagick.org
Php 5.5.30
on Centos (Production)

Imagick compiled with ImageMagick version ImageMagick 6.8.9-9 Q16 x86_64 2015-01-06
Imagick using ImageMagick library version ImageMagick 6.8.9-9 Q16 i686 2015-08-06
5.6.11-1ubuntu3 on Ubuntu 15.10 (My Virtual Server)

//JPEG on 100 quality
$tempFile->encode(iext(true), 100);
$return = $tempFile->save($file . iext());

foreach ($config["variations"] as $key => $var) {
    $tempVariationFile = $tempFile;
    $tempVariationFile->resize($var["width"], $var["height"]);
    $return = $tempVariationFile->save($file . '-' . $key . iext());
}

return $return;

iext(true) returns "jpg"
iext() returns ".jpg"

What am i doing wrong ?

@willrowe
Copy link

Did you try adjusting the quality parameter on the save() call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants