/ Published in: PHP
The plugin's "shave_all" function was not properly cropping and resizing the thumbnails for me. The following needs to be changed in sfImageMagickAdapter.class.php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Change lines 223-237: $width = $this->sourceWidth; $height = $this->sourceHeight; $x = $y = 0; switch (@$this->options['method']) { case "shave_all": if ($width > $height) { $width = $height; } elseif ($height > $width) { $height = $width; } to: $width = $this->sourceWidth; $height = $this->sourceHeight; $mWidth = $this->maxWidth; $mHeight = $this->maxHeight; $x = $y = 0; switch (@$this->options['method']) { case "shave_all": if ($width > $height) { $width = $height; } elseif ($height > $width) { $height = $width; }