Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I'm trying to offer a simple search where people can find images that have specific colors in. For example, they wanna view images with orange (from a start to end color, i.e very light orange - to a very dark orange). I know we have "identify" that helps with this, but can anyone give me any guidelines?
..and this gives a ton of info - but I just need a nice way to work out if something has orange in (and if so, I will set a flag isOrange => 1 in the my database )
If you are on linux/mac or windows with cygwin, you could try my script locatecolors at the link below. However, I have not had time to fix it for more current versions of IM. So if you are interested, let me know and I will try to fix it next. I am in the process of updating all my scripts for changes in IM colorspace handling.
IM per say, does not have a direct function to search for colors between two values. What it does have is -fuzz XX% that allows you to search in RGB colorspace for any color within that percent difference. The problem is that it is not selective to one hue such as orange. The search needs to be done on the hue channel from -colorspace HSL or HSB and threshold between the two hue values as is done in my script. So if you understand my script you can cut out the right code and have it return a yes or no or percent value of the color found rather than output an image.
Just having a look at your script to see if it can do what I'm trying (I'm just a coder, but the person I'm working on this with is a graphics designer, so I'm hoping he can shed some light on "ranges" for the different colours we are trying to grab )
Just had a quick look, and it seems like your script doesn't do quite what I'm trying to achieve Its not a major part of the site (just something I'd quite like to do, as there are a couple of other sites I'm working on atm that I would like to add the "filter by color" system <G>).
I'll have a play around a bit more over the coming days, and see if I can come up with something / find something on the web.
That version of IM may still need some changes for my script and may be a version in transition. I would have to update the script to see what happens.
But if the concept and examples on my web site are not quite what you want, then no problem.
Correction. My script, locatecolors, does not work directly on the hue channel, but in rgb by channel. If you want to process by hue, see my script huemap. It locates all hues between two values and maps them to some other range of hues. Perhaps that is the kind of approach you want.