New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding transparent png support to text watermarks #1317
Conversation
…not removed from the original file.
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
==
-> ===
, add a changelog entry and it's all good!
Ok I added a line into there, I assume that was the right place? |
Yes, but at the same time you've somehow gone out of sync with the repository. Try this:
|
hmm im using github for mac and I don't know how to do that from there lol |
Open a terminal window (not sure how it's called on Macs, might be console as well), type |
@jakemac53 would you be able to pull in the latest changes and update line 1318 to read if ($this->image_type === 3) please and we can pull in this change |
…nally from pull bcit-ci#1317, partially fixes bcit-ci#1139)
When performing a text watermark previously on a transparent png it would lose its transparency. Now it checks the image type and adds transparency support, following the same practice that is used when resizing images.