Gregwar / Image

A PHP library to handle images
MIT License
1k stars 191 forks source link

change zoomCrop to use force #12

Closed valan closed 11 years ago

valan commented 11 years ago

I was having an issue where zoomCrop would produce an image with a 1px white strip on the bottom edge when using odd numbered dimensions, this seems to fix it

Gregwar commented 11 years ago

Can you please give more information about this issue ? Thanks

valan commented 11 years ago

here are some examples of an image where I just did ::open($url)->zoomCrop($width, $height)->get('jpg', 80);

they might have to be opened in firefox or somewhere with a dark background to see the white strip on the bottom

results are before and after the change. also after doing a few more different dimensions it seems like it's not related to odd numbered dimensions after all, as I got the same strip on all the before images

original image

123x123 before: 123x123_before

123x123 after: 123x123_after

50x123 before: 50x123_before

50x123 after: 50x123_after

123x50 before: 123x50_before

123x50 after: 123x50_after

50x50 before: 50x50_before

50x50 after: 50x50_after

Gregwar commented 11 years ago

Ok This will deserve a deeper look

Thanks for contributing!