我想从表单窗口浏览图像。我还创建了一个类并创建了一些过滤器。我可以从表格中读取这张图片。
我的目标是在课堂上宣布它。并在任何地方使用这个图像。但我不知道我该怎么做。
private void btn_BROWSE_Click(object sender, EventArgs e)
{
OpenFileDialog imge = new OpenFileDialog();
imge.Filter = "Extensions |*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff|"
+ "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|"
+ "Zip Files|*.zip;*.rar";
imge.ShowDialog();
string imgepath = imge.FileName;
pBox_SOURCE.ImageLocation = imgepath;//i'm browsing an image
}
private void sliderKernel_MouseUp(object sender, MouseEventArgs e)
{
Bitmap OriginalImage = new Bitmap(pBox_SOURCE.Image);
}
class Filters
{
// (i would like to initialize my image in here not in form :) )
}
慕运维8079593
慕侠2389804
相关分类