News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Martin Psinas' Blog:
Watermarking with text and ImageMagick
October 04, 2011 @ 11:44:35

Martin Psinas has submitted a new tutorial he's written up (complete with sample code) showing how to watermark an image with ImageMagick.

In my most recent venture with PHPMaster I was asked to write an article about watermarking images with PHP using ImageMagick. Virtually no documentation exists on the PHP API, although there are plenty of command-line examples from the official ImageMagick website. I spent a solid day and a half attempting to convert command-line code into PHP before (due to miscommunication) the topic was covered by someone else and my work was no longer needed. Although disappointed, it gave me something to blog about! Yay.

His script is pretty straight forward - it loads a sample image, sets up some watermark text and applies it with a "gravity" setting of "southwest" and adds it to the image (annotateImage). The output is pushed back out as a JPEG image. Also included is a slightly more complex example showing how to give the watermark an embossed look and a "text all over the image" look to prevent use of any part of the image, not just one section.

0 comments voice your opinion now!
watermark text image tutorial imagemagick emboss


blog comments powered by Disqus

Similar Posts

Codewalkers.com: New Tutorial - Coding \"Best Practices\" - or at least \"Better Practices\"

DeveloperTutorials.com: Inserting An Array Into A Database

ThinkPHP Blog: Methods to Reduce the Load of Your Webserver by Caching Content

Max Horvath's Blog: How to enable the Xdebug debugger in Zend Studio for Eclipse

Thomas Weinert: Building A Sensor Phalanx With PHP


Community Events





Don't see your event here?
Let us know!


interview wordpress install introduction bugfix api application library release unittest list threedevsandamaybe developer framework series community laravel configure podcast language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework