sconsult / croppic

croppic
914 stars 228 forks source link

Cropped image becoming blur #236

Closed hhh062001 closed 8 years ago

hhh062001 commented 8 years ago

It is working fine on PHP version 5.3 and 5.4. But when i am using croppic on 5.6 then it is creating problem. After image crop the new image becoming blur.

Orignal Image orignal-image

Cropped Image crop-image

ZdenekPNJ commented 8 years ago

HI, I´ve the same problem with PHP version 5.5.12. I´ve $jpeg_quality = 100. I´dont know, where is the problem. Original 15 Cropped test_11602

hhh062001 commented 8 years ago

I have solved the issue.

Add imageconvolution($original_img,array(array(-1,-1,-1),array(-1,16,-1),array(-1,-1,-1)),8,0); After imagecopyresample and before imagejpeg() Imageconvolution is used to sharpen the image