I have this code, how can I allow it to accept all typical image formats? PNG, JPEG, JPG, GIF?
Here\'s what I have so far:
public void EncryptFile()
Just a necrocomment for using string.Join and LINQ.
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
dlgOpenMockImage.Filter = string.Format("{0}| All image files ({1})|{1}|All files|*",
string.Join("|", codecs.Select(codec =>
string.Format("{0} ({1})|{1}", codec.CodecName, codec.FilenameExtension)).ToArray()),
string.Join(";", codecs.Select(codec => codec.FilenameExtension).ToArray()));