Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public static void Calculate(MosaicProject project)
        {
            ProjectStats stats = new ProjectStats();

            InitializeOriginal(stats, project);
        }