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 »

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 »

figured it out.
Post Reply