Jump to content

Advanced image processing: Blend modes


statestreet
 Share

Recommended Posts

I have an area on a site currently where there's a series of portrait images that appear with a blend mode that was applied in Photoshop. As it stands, anyone adding a new portrait has to have Photoshop, download the source PSD, and export the new file. 

I don't think we'll need to add new portraits so often that this needs to be automated, but of course, that doesn't stop me from wanting to think about how to do it. :) What I'd like to do, ideally, is have the server apply the blend mode to the image either when it's uploaded or when it's rendered. I'm guessing I'd have to use GD to do this, and hook into image->size(), but I don't know exactly where I'd start.

Link to comment
Share on other sites

Not sure if you have seen it or not, but this module by horst is currently the PW image manipulation option:

http://processwire.com/talk/topic/4264-release-page-image-manipulator/

You may actually need to look beyond GD to imagemagick - it is much more powerful. If you also get the imagick pecl extension, you'll have a very powerful PHP-only tool. I bet you could use horst's module as a starting point to create an imagick version with more options, but you'll have a bit of work ahead of you. If you do want to start tackling this, take a look at my Image Rasterizer module: http://processwire.com/talk/topic/4632-image-rasterizer/ which uses imagick. It should give an idea of how you can manipulate an image on upload using PW and imagick in a simple module.   

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...