private static void InitializeOriginal(ProjectStats stats, MosaicProject project) { BitmapImage image = new BitmapImage(new Uri(project.OriginalPath)); FormatConvertedBitmap convertedImage = new FormatConvertedBitmap(image, PixelFormats.Rgb24, null, 0); stats.OriginalWidth = convertedImage.PixelWidth; byte[] pixels = new byte[convertedImage.PixelHeight * stats.OriginalStride]; convertedImage.CopyPixels(pixels, stats.OriginalStride, 0); }
public static void Calculate(MosaicProject project) { ProjectStats stats = new ProjectStats(); InitializeOriginal(stats, project); }