News Feed
Jobs Feed
Sections




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

Mikko Koppanen's Blog:
Choosing watermark color based on the background luminosity
October 13, 2007 @ 16:04:00

Mikko Koppanen has another blog entry posted dealing with image manipulation with PHP and Imagick, this time it's a cool little script that lets you pick your watermark's color based on the image's background luminosity.

Usually images are watermarked using a predefined color (let's say for example "white"). How well does this actually work when you're doing the watermark on a light or even a white image? The answer is simple: not very well.

His example uses the ImagickPixelIterator to check the luminosity of the background and assigns the text a value between black and white according to the background. Complete code with usage and examples of the resulting images are included.

0 comments voice your opinion now!
imagick watermark color background luminosity imagick watermark color background luminosity


blog comments powered by Disqus

Similar Posts

Wan Qi Chen: Background jobs with php and resque (Series)

AlternateInterior.com: Multi-Threading Strategies in PHP

Gonzalo Ayuso's Blog: Watermarks in our images with PHP and Gearman

The Bakery: Four New Articles/Components (Colors, Models, InotImg & CakeSWXPHP)

PHPit.net: Image manipulation with PHP & the GD library (Part 2)


Community Events











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


symfony2 facebook security hhvm introduction composer unittest package threedevsandamaybe podcast code install component release application overview framework opinion hack language

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