Search code examples
phpblendmodecolorizehue

PHP: color overlay with Hue blend mode


Can anyone tell me how in PHP, I can do the same effect as in Adobe Photoshop - Color overlay->Blend mode:Hue

This thing colorizes all colorful pixels (non-grascale ones). I need it for my project - http://iconizer.net . I managed to make the colorisation, but it paints the gray shadows too. I need shadows and other grayscale pixels to be left untouched. I can do it with pixel-by-pixel scanning, but it's crazy. There has got to be a simpler solution. Does anyone know it?

Thanks in advance.


Solution

  • Use a specialized image editing tool such as imagemagick. Then get PHP to call it with your wanted options. It will be much faster, and save you a lot of hassle.

    http://www.imagemagick.org/script/index.php