Beispiel #1
0
        /// <summary>
        /// Checks if the Image control is empty (all pixels are blank)
        /// </summary>
        public static bool IsEmpty(this Image image)
        {
            var bitmap = image.ToBitmapSource();

            if (bitmap == null)
            {
                return(true);
            }
            return(bitmap.IsEmpty());
        }
Beispiel #2
0
        /// <summary>
        /// Gets array of Pixels that builds this Image
        /// </summary>
        public static int[] GetPixels(this Image image)
        {
            var bitmap = image.ToBitmapSource();

            return(bitmap.GetPixels());
        }