Retriev color code from image.

Reply

Join Date: Jul 2008
Posts: 9
Reputation: kuldeep04 is an unknown quantity at this point 
Solved Threads: 0
kuldeep04's Avatar
kuldeep04 kuldeep04 is offline Offline
Newbie Poster

Retriev color code from image.

 
0
  #1
Jan 8th, 2009
Hi All,

I m working on one web site and i want to search image from given color code,and i put one color piker for that but i don't know how can i get the image from that color code.

my site URL is :
http://www.alleystock.com/avd_search.php

please help me for that....!
Kuldeep (KD)
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 149
Reputation: mschroeder is on a distinguished road 
Solved Threads: 25
mschroeder mschroeder is offline Offline
Junior Poster

Re: Retriev color code from image.

 
0
  #2
Jan 8th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC