Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions php_image_magician.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ public function resizeImage($newWidth, $newHeight, $option = 0, $sharpen = false
$this->keepTransparancy($optimalWidth, $optimalHeight, $this->imageResized);
imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height);

// *** Set new "original" sizes to correct padding calculations
$this->width=$optimalWidth;
$this->height=$optimalHeight;

// *** If '4', then crop too
if ($option == 4 || $option == 'crop') {
Expand Down