Permalink
Browse files

Adding transparent png support to text watermarks so transparency is …

…not removed from the original file.
  • Loading branch information...
1 parent 87a4b54 commit c23d9f823c2741ea98e4f3da5b92a616bffa0bf9 @jakemac53 committed May 3, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 system/libraries/Image_lib.php
@@ -1313,6 +1313,13 @@ public function text_watermark()
imagestring($src_img, $this->wm_font_size, $x_axis, $y_axis, $this->wm_text, $txt_color);
}
}
+
+ // png we can actually preserve transparency
+ if ($this->image_type == 3)
+ {
+ imagealphablending($src_img, FALSE);
+ imagesavealpha($src_img, TRUE);
+ }
// Output the final image
if ($this->dynamic_output == TRUE)

0 comments on commit c23d9f8

Please sign in to comment.