diff options
Diffstat (limited to 'protected/extensions/SimpleImage/SimpleImage.php')
| -rw-r--r-- | protected/extensions/SimpleImage/SimpleImage.php | 10 |
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 |
