1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 04:37:51 +02:00

Merge branch 'master'

This commit is contained in:
Awilum
2013-12-19 22:19:48 +02:00

View File

@@ -243,6 +243,10 @@ class Image
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $new_width;
$this->height = $new_height;
return $this;
}
@@ -282,10 +286,14 @@ class Image
imagefill($this->image, 0, 0, $transparent);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $old_image, 0, 0, 0, 0, $width, $height, $width, $height);
imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height);
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $width;
$this->height = $height;
return $this;
}
@@ -651,3 +659,4 @@ class Image
}
}
code