I would like to Convert a BitmapImage to a Grayscale BitmapImage: Which I get from a method and therefore - the Width and Height are unknown to me. I have tried looking into opt
Not sure of the namespaces here but something like this may work:
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
FormatConvertedBitmap bitmapGreyscale = new FormatConvertedBitmap(bitmap, PixelFormats.Gray8, BitmapPalettes.Gray256, 0.0);