private void menuFileOpen_Click(object sender, EventArgs e) { if (this.openFileDialog.ShowDialog() == DialogResult.OK) { String theFile = openFileDialog.FileName; photograph = new PhotographData(theFile); iImage = Bitmap.FromFile(theFile); iImageF = ImageF.FromBitmap(iImage as Bitmap); this.pictureMain.Size = iImage.Size; pictureMain.Image = iImage; //this.AutoScrollMinSize = new Size(iImage.Width, iImage.Height); } }
private void btnLoad_Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "PhotoData|*.pds"; dlg.DefaultExt = "pds"; if (dlg.ShowDialog() == DialogResult.OK) { photograph = PhotographData.Load(dlg.FileName); iImage = Bitmap.FromFile(photograph.Image); iImageF = ImageF.FromBitmap(iImage as Bitmap); this.pictureMain.Size = iImage.Size; pictureMain.Image = iImage; foreach (SpatiallyVariantPsf thePsf in photograph.PSFs) { this.imageScan1.Add(thePsf); } } }