VintaSoft Imaging .NET SDK and Plug-ins Discussions

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

Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

loading an image from a file



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.
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;       
}


Re: loading an image from a file

Post by BillG »

figured it out.


Page 1 from 1: 1