A reader sent in this request today:
I'm trying to find a way to leverage open source/built-in image manipulation to allow me to replace one color in an image with another determined by a user. Have you run into this before or do you have any suggestions?
So I was sure Alagad's Image Component would have this as it has a large number of methods, but it did not. (Alagad isn't open source or free but at 70 bucks it is a dang solution.) Rick Root's Image.cfc doesn't seem to have this either.
So does anyone else know of a solution that will do this?
Archived Comments
Yes. Eyebatch 2 has a color replace function as well as lots of other, dead useful, tricks.
http://www.eyebatch.com/eye...
http://www.efflare.com/prod...
its a custom tag for coldfusion. I have personal experience
with their products and they perform really well.
try the 30 day demo
Use java.
http://www.jhlabs.com/ip/fi...
some free java filters. The person should look into using the "MAP COLORS FILTER" to do what he wants.
Is cfexecute is allowed, an external application like ImageMagick (http://www.imagemagick.org) gives you a lot of power in image manipulation, but perhaps is too complex for just color replace.
I have a wish list request in for Fireworks to build an SDK that would let us take graphics built in FW and process them with a script.
problem with efflare is it's a .dll...ugly
the other solutions are external programs, too complex or involved, etc...can't integrate them into a CF app easily...
use Flash. make an interface to upload, pick color, replace color, etc. using as2 bitmap filters or as3.
then on the backend use Alagad to save and manipulate the results. I have built a dynamiic image upload, crop, thumbnail app using this method but you could easily add a color pick/replace.
I have some code that allows you to change the color pallete of a GIF image quite easily using CF:
http://blog.brianflove.com/...