diff options
Diffstat (limited to 'protected/extensions/SimpleImage/SimpleImage.php')
| -rw-r--r-- | protected/extensions/SimpleImage/SimpleImage.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protected/extensions/SimpleImage/SimpleImage.php b/protected/extensions/SimpleImage/SimpleImage.php index 54c4ef8..9f97a57 100644 --- a/protected/extensions/SimpleImage/SimpleImage.php +++ b/protected/extensions/SimpleImage/SimpleImage.php @@ -149,11 +149,16 @@ class SimpleImage { }
function blend($width, $height) {
+ if($width < $this->getWidth()) {
$this->resizeToWidth($width);
+ }
+ if($height > $this->getHeight()) {
+ $height = $this->getHeight();
+ }
$new_image = imagecreatetruecolor($width, $height);
imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $width, $height);
imagealphablending($new_image,true);
- imagefilledrectangle($new_image, 0, 0, $width, $height, imagecolorallocatealpha($new_image, 255, 255, 255, 30));
+ imagefilledrectangle($new_image, 0, 0, $width, $height, imagecolorallocatealpha($new_image, 255, 255, 255, 25));
$this->image = $new_image;
}
|
