cooldude832 Posted July 31, 2008 Share Posted July 31, 2008 I have a map of the USA that I want to copy into another image but change its color each time. I do not wish to make a ploygon of Michigan to do it is there a simpler way? The original image is a rectangle image and the michigan map is sitting on top of my transparent defined color (i want to define a color for the Michigan portion only any ideas? Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 31, 2008 Share Posted July 31, 2008 Imagick will do it, but you might need to piss with it. You'll probably need to create an image of the new color, then merge it with another one. I know you can do some cool stuff with "composite -compose Multiply", but probably not what you want. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 31, 2008 Author Share Posted July 31, 2008 well I thought of one using gd where the image is scanned from the outter edge pixels inward until the color changes from the transparent background to the inner image. Using those coordinates make a new image ploygon but ti was just ugly so I made 50 mono colored images and use a random picker to pick em each time. Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 31, 2008 Share Posted July 31, 2008 Couldn't you have made a mask, and put the color you anted to change in as transparent - then float that over another div and just use javascript to change the color? I was going to say that, but I idn't know what you where doing it. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 31, 2008 Author Share Posted July 31, 2008 hmm I could but again the problem is I need to color the mask area also which defeats the purpose. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.