As I\'m bringing in images into my program, I want to determine if:
#1
While I know the OP is not about MagickNet, it might help s/o.
Magick.Net provides a wrapper around Imagick lib and includes a feature to easily access channel statistics.
Example
public bool HasTransparentBackground(MagickImage image)
{
if (!image.HasAlpha) return false;
var statistics = image.Statistics();
var alphaStats = statistics.GetChannel(PixelChannel.Alpha);
var alphaMax = Math.Pow(2, alphaStats.Depth);
return alphaStats.Minimum < alphaMax * .2;
}
We first check if the image supports transparency an return if not. Then we get statistics for alpha channel and can simply check the Min property. There's also a Mean property that allows you to check "how much transparent" your image is.
See also