summaryrefslogtreecommitdiff
path: root/protected/extensions/SimpleImage/SimpleImage.php
diff options
context:
space:
mode:
authorastaf <astaf@proxy.ccwn.org.ccwn.org>2013-06-25 15:25:18 +0200
committerastaf <astaf@proxy.ccwn.org.ccwn.org>2013-06-25 15:25:18 +0200
commit95434b8b6973b13cc7409913d36c6829c4f2aac5 (patch)
tree358ea5f65d3496be78f5d03f822e52cb553fb369 /protected/extensions/SimpleImage/SimpleImage.php
parent5c2a521096d17edf8e8c363bf1ef486ecc5fbd4a (diff)
parent3805c272732edd5257331050387f80f9ec521a57 (diff)
Merge branch 'master' of ssh://proxy:9044/home/ccwn/git-repos/admin.astaf.de
Conflicts: protected/runtime/application.log
Diffstat (limited to 'protected/extensions/SimpleImage/SimpleImage.php')
-rw-r--r--protected/extensions/SimpleImage/SimpleImage.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/protected/extensions/SimpleImage/SimpleImage.php b/protected/extensions/SimpleImage/SimpleImage.php
index bbccfa0..54c4ef8 100644
--- a/protected/extensions/SimpleImage/SimpleImage.php
+++ b/protected/extensions/SimpleImage/SimpleImage.php
@@ -147,5 +147,15 @@ class SimpleImage {
imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());
$this->image = $new_image;
}
+
+ function blend($width, $height) {
+ $this->resizeToWidth($width);
+ $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));
+ $this->image = $new_image;
+
+ }
}
?> \ No newline at end of file