Esempio n. 1
0
        public static BitmapSource CompressToBitmapSource(this BitmapFrame frame, int quality)
        {
            if (frame.IsNullOrEmpty())
            {
                return(null);
            }

            return((BitmapSource)frame.CompressToImageSource(quality));
        }