I have a BitmapImage from a StorageFile:
using (var stream = await file.OpenAsync(FileAccessMode.Read)) {
var bitmap = new BitmapImage();
await bitmap.SetSourceAsync(stream);
}
I've been able to check if the image is square by calculating its PixelWidth and PixelHeight properties. How do I check if image color is grayscale? This post says that Bitmap has a PixelFormat property, unfortunately, Bitmap is no longer available in UWP.