summaryrefslogtreecommitdiff
path: root/protected/extensions/SimpleImage
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2013-06-25 15:14:49 +0200
committerPatrick Seeger <pseeger@ccwn.org>2013-06-25 15:14:49 +0200
commitb4dfd48928c04f7256e4d6e4e2a316310935d28e (patch)
tree9c2f5ce95745680d51a2a2823d8583d0fdd431a0 /protected/extensions/SimpleImage
parent9d7cce38ef2c157ca44df2bd8f43a27bbd09fcec (diff)
Upload von Hintergrundbildern
Diffstat (limited to 'protected/extensions/SimpleImage')
-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