loading an image from a file

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
BillG
Posts: 47
Joined: Fri Oct 10, 2008 3:52 pm

loading an image from a file

Post by BillG » Sat Sep 27, 2014 6:54 pm

I display an openfiledialog and the user selects the file they want to upload to the Vintasoft image viewer. I had it working with a regular image now I am converting the app to us the VintasoftImage and viewer.

Code: Select all

OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = GetImageFilter();
if (dialog.ShowDialog() == DialogResult.OK)
{
    image = VintasoftImage.FromFile(dialog.FileName, true);  // this is the problem line. how do I get the image from the file to an vintasoft image so I can display it in the viewer?
    DisplayPhoto(image);
}

public void DisplayPhoto(VintasoftImage image)
{
    ImageViewer.Image = image;
    ImageViewer.SizeMode = ImageSizeMode.BestFit;       
}

BillG
Posts: 47
Joined: Fri Oct 10, 2008 3:52 pm

Re: loading an image from a file

Post by BillG » Sun Sep 28, 2014 3:15 am

figured it out.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests