Hello,
I would like to be able to identify completely black images in order that I can exclude them. I am thinking I could use gdlib but I cannot find a suitable function. If I can find the rgb of the image then I can exclude it. Any help appreciated.
Maybe gdlib is not the answer as it would need to id the rgb of every pixel in the image! So, I suppose the question should be - how do I identify a completely black image on the fly?
http://uk.php.net/manual/en/ref.image.php
Im not sure which is best, but there are a list of image functions for php at this link, impritty sure i worked on something similar to what your tring im tring to find it in my archives.
thanks for looking sheephat. Another idea is to count the number of colours in the image, if it equals 1 - then do the biz. imagecolorstotal doesn't work if the image is truecolr though - still looking...
OK resolved this by using imagetruecolortopalette which converts the image to a form that can be used with imagecolorstotal then, if the number of colours equals 1, then exclude it. Might not be elegant, but it works.