public void load_hdr_image() { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.FileName = "hdr_image"; // Default file name dlg.DefaultExt = ".hdr"; // Default file extension dlg.Filter = "HDR (.hdr)|*.hdr|All Files (*.*)|*.*"; // Filter files by extension Nullable <bool> result = dlg.ShowDialog(); if (result == true) { string filename = dlg.FileName; this.hdr_image = RenEditors.RenUtils.LoadHdrImage(filename); this.hdr_output = RenEditors.PyImage.CreateImage(hdr_image.Width, hdr_image.Height, RenEditors.ImageType.PRGBA); this.txt_filename.Text = dlg.FileName; this.txt_img_width.Text = this.hdr_image.Width.ToString(); this.txt_img_height.Text = this.hdr_image.Height.ToString(); this.tone_map(); } }
public void load_hdr_image() { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.FileName = "hdr_image"; // Default file name dlg.DefaultExt = ".hdr"; // Default file extension dlg.Filter = "HDR (.hdr)|*.hdr|All Files (*.*)|*.*"; // Filter files by extension Nullable<bool> result = dlg.ShowDialog(); if (result == true) { string filename = dlg.FileName; this.hdr_image = RenEditors.RenUtils.LoadHdrImage(filename); this.hdr_output = RenEditors.PyImage.CreateImage(hdr_image.Width, hdr_image.Height, RenEditors.ImageType.PRGBA); this.txt_filename.Text = dlg.FileName; this.txt_img_width.Text = this.hdr_image.Width.ToString(); this.txt_img_height.Text = this.hdr_image.Height.ToString(); this.tone_map(); } }