Esempio n. 1
0
        /// <summary>
        ///   Gets the stride (number of bytes that define a row) of the given image.
        /// </summary>
        ///
        public static int GetStride(this BitmapSource image)
        {
            int bytesPerPixel = image.GetPixelFormatSize();

            return(image.PixelWidth * bytesPerPixel);
        }