2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by mschroeder
0

I assume what you want to be able to do is have someone be able to select a color code, or maybe something as simple as red, blue, green, etc and then return images from your database that contain a large percentage of that color.

I have never seen this accomplished with GD, but it would be quite possible using the imagick extension or even imagemagick called from the command line.

This example comes to mind: http://valokuva.org/?p=72 It will need some modification as it currently is displaying the color palette as an image but could get you pointed in the right direction.

Once you knew the color palette you could store that information in your database and then when you ran a search it could look for anything with that color in the palette.

** This requires the imagick extension for php which is not installed or included by default. Although you should be able to do it with GD by iterating over each pixel of each image.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.