Пример #1
0
        public void LoadImage(string path)
        {
            var image = ImageIO.LoadImage(path);

            ImageProvider.OriginalImage = image.Clone(new Rectangle(0, 0, image.Width, image.Height), System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            ImageProvider.EditedImage   = image.Clone(new Rectangle(0, 0, image.Width, image.Height), System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            ImageProvider.ImagePath     = path;
            ImageProvider.Reset();
        }
Пример #2
0
        private static ImageBuffer LoadImage(string filePath)
        {
            try
            {
                if (File.Exists(filePath))
                {
                    return(ImageIO.LoadImage(filePath).SetPreMultiply());
                }
            }
            catch { }             // Suppress exceptions, return null on any errors

            return(null);
        }