예제 #1
0
        private void CreatePreview()
        {
            imageWorks?.img?.Dispose();
            imageWorks = new ImageWorks((filesListBox.SelectedItem as ImageInformation));
            bool isOK = imageWorks.TryCreateImageWithCorrectOrientation();

            if (isOK)
            {
                pictureBox.Image = imageWorks?.ScaleImage(pictureBox.Width, pictureBox.Height, Color.White);
            }
            else
            {
                pictureBox.Image = null;
            }
        }
예제 #2
0
 private void ShowImage()
 {
     imageWorks = new ImageWorks(imageInformation);
     imageWorks.TryCreateImageWithCorrectOrientation();
     pictureBox.Image = imageWorks?.ScaleImage(pictureBox.Width, pictureBox.Height, Color.White);
 }