I would like to create a webpage where a user can upload a photo and then it gets converted so that they can see what their dog would see.
I have never used ImageMagick but before I go through the learning curve I'd like to make sure this can be done.
What I want to do, for example, is take everything from one part of the color spectrum (i.e. everything from blue to purple) and display it in shades of blue. Then, I want to take other parts of the spectrum and display it in shades of yellow, etc.
Can I do this with IM?
Newbie question:Color modification of photos.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Newbie question:Color modification of photos.
can you post links to an input image and the way you want it to look? (you have to post somewhere else, say some free image serviced and put links here to it). Or do you have a url to some page on the internet that shows that?
Re: Newbie question:Color modification of photos.
Let me see if I can simplify my question...
Is it possible for me to take all of the purple in a photo and change it to blue using imagemagick?
Is it possible for me to take all of the purple in a photo and change it to blue using imagemagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Newbie question:Color modification of photos.
Yes
convert image -fuzz XX% -fill blue -opaque purple result.
This will take all near colors within XX% of pure purple and change them ALL to pure blue.
convert image -fuzz XX% -fill blue -opaque purple result.
This will take all near colors within XX% of pure purple and change them ALL to pure blue.
Last edited by fmw42 on 2010-09-05T16:56:38-07:00, edited 3 times in total.
Re: Newbie question:Color modification of photos.
excellent! thank you.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Newbie question:Color modification of photos.
Also see my script huemap at the link below.
Re: Newbie question:Color modification of photos.
Thanks. I found exactly what I want to do....I want to use to -clut function to replace one spectrum with another. Now I just need to figure out how to use IM via a php script. (I just started a new topic to ask about this.)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Newbie question:Color modification of photos.
You can create a unix shell script and just call that script from PHP via the exec function. See http://www.rubblewebs.co.uk/index.php for many examples of PHP and IM together. This way you can test your script locally on your own computer and then run it from some server using PHP. The main thing to keep in mind is that in PHP, the convert command usually needs to be prefaced by its full path, typically /usr/local/bin/convert or /usr/bin/convert