Shawn05 Posted June 15, 2006 Share Posted June 15, 2006 Does anyone know how to use GD Library to find the dominate color in an image other then black & white? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/12065-gd-library-finding-dominate-color/ Share on other sites More sharing options...
.josh Posted June 15, 2006 Share Posted June 15, 2006 [a href=\"http://www.mayge.com/dominate-color.php\" target=\"_blank\"]http://www.mayge.com/dominate-color.php[/a]google is your friend. Quote Link to comment https://forums.phpfreaks.com/topic/12065-gd-library-finding-dominate-color/#findComment-45886 Share on other sites More sharing options...
Shawn05 Posted June 15, 2006 Author Share Posted June 15, 2006 lol google will take over the world. Thank you for your helpAny idea how I would check for shades of black and white so I can exclude them? There can be so many different shades so if you find an easier way let me know ;) Quote Link to comment https://forums.phpfreaks.com/topic/12065-gd-library-finding-dominate-color/#findComment-45888 Share on other sites More sharing options...
zq29 Posted June 15, 2006 Share Posted June 15, 2006 It's slightly more complex to find the shades. One option could be to convert the current pixels colour from RGB to HSV and compare the saturation and value to a threshold, if it is within that threshold, don't include it in the array. Quote Link to comment https://forums.phpfreaks.com/topic/12065-gd-library-finding-dominate-color/#findComment-46067 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.