Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

jakemac53
Copy link

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.

@@ -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)
Copy link
Contributor

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!

@jakemac53
Copy link
Author

Ok I added a line into there, I assume that was the right place?

@narfbg
Copy link
Contributor

narfbg commented Jun 12, 2012

Yes, but at the same time you've somehow gone out of sync with the repository. Try this:

git pull git@github.com:EllisLab/CodeIgniter.git develop

@jakemac53
Copy link
Author

hmm im using github for mac and I don't know how to do that from there lol

@narfbg
Copy link
Contributor

narfbg commented Jun 13, 2012

Open a terminal window (not sure how it's called on Macs, might be console as well), type cd /path/to/your/github/CodeIgniter/dir and then you should be able to run that command.

@alexbilbie
Copy link
Contributor

@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

narfbg added a commit that referenced this pull request Oct 5, 2012
@narfbg narfbg closed this Oct 5, 2012
nonchip pushed a commit to nonchip/CodeIgniter that referenced this pull request Jun 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants