Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding transparent png support to text watermarks so transparency is …

…not removed from the original file.
  • Loading branch information...
commit c23d9f823c2741ea98e4f3da5b92a616bffa0bf9 1 parent 87a4b54
@jakemac53 authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 system/libraries/Image_lib.php
View
7 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)
Please sign in to comment.
Something went wrong with that request. Please try again.