| | |
Retriev color code from image.
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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....!
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)
•
•
Join Date: Jul 2008
Posts: 149
Reputation:
Solved Threads: 25
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.
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.
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: Help with image resize and watermark
- Next Thread: PHP HTTP Screen-Scraping Class with Caching
Views: 940 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database dataentry date directory display download dynamic echo email error file files folder form forms freelancing function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap sorting source space speed sql structure syntax system table tutorial tutorials update updates upload url validation validator variable video web xml youtube zend





