.
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Image files|*.jpg;*.jpeg;*.dds;*.bmp";
if (ofd.ShowDialog() == DialogResult.OK)
imagePath = ofd.FileName;
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "JPEG|*.jpg;*.jpeg|DDS|*.dds|BMP|*.bmp";
if (sfd.ShowDialog() == DialogResult.OK)
imagePath = sfd.FileName;
string imagePath;