diff options
| author | astaf <astaf@proxy.ccwn.org.ccwn.org> | 2013-06-25 15:50:08 +0200 |
|---|---|---|
| committer | astaf <astaf@proxy.ccwn.org.ccwn.org> | 2013-06-25 15:50:08 +0200 |
| commit | bc541bf09fb9afcc7810dcbe510b1783c79016ea (patch) | |
| tree | 51e65a48a0b5994eba779a1118c4964d6f63f97c /protected/extensions/SimpleImage/SimpleImage.php | |
| parent | 95434b8b6973b13cc7409913d36c6829c4f2aac5 (diff) | |
| parent | 0eb5ddf9beede4062eaa32972e7e1a7fa1694346 (diff) | |
Merge branch 'master' of ssh://proxy:9044/home/ccwn/git-repos/admin.astaf.de
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;
}
|
