Is there any way that I could detect a black or almost black layer I download from the internet?
What I am trying to do is animate a series of visual satellite images that come in during the day. Obviously early and late they come in black and some semi-black with the earths terminator crossing it at dawn and dusk.
Would it be possible in some way to count the dark/black pixels and say if there was more than say 80% to remove the layer?
TImageEnProc.GetDominantColor Declaration function GetDominantColor(var Color:TRGB):double; Description GetDominantColor returns the dominant (most used) color in the image. Color will contain the dominant color, and the returned result will contain the percentage of the dominant color.
Example
Percentage := ImageEnView.Proc.GetDominantColor(cl); If Percentage=100 then ShowMessage('the image is blank!');