magento-hackathon / Perfect_Watermarks

A replacement for Magento's GD2 image adapter with imagemagick
Open Software License 3.0
53 stars 28 forks source link

This fixes an issue you have when performing a crop after a resize. #13

Closed hostep closed 9 years ago

hostep commented 9 years ago

While trying to integrate the ImageMagick Adapter with the AdaptiveResize extension I noticed the cropping was completely wrong. The extension first resizes and then crops, and there was an issue here. You have to refresh the _imageSrcWidth and _imageSrcHeight members after a resize and use them in the crop, similar as the Varien_Image_Adapter_Gd2 class is doing.

This pull request fixes this.

I took most of the code from the current Magento2 ImageMagick integration