// Returns whether or not the image is fully opaque. private static bool opaque(image.Image m) { { opaquer (o, ok) = opaquer.As(m._<opaquer>())!; if (ok) { return o.Opaque(); } } var b = m.Bounds(); for (var y = b.Min.Y; y < b.Max.Y; y++) { for (var x = b.Min.X; x < b.Max.X; x++) { var (_, _, _, a) = m.At(x, y).RGBA(); if (a != 0xffffUL) { return false; } } } return true; }