validate settlement record c#
i'm loading an settlement file, i wish know countenance settlement before entirely review file.
string filepath = "image.jpg";
image newimage = image.fromfile(filepath);
the problem occurs image.jpg isn't unequivocally jpg. example, i emanate an lifeless calm record rename image.jpg, an outofmemory difference thrown image.jpg loaded.
i'm looking duty countenance an settlement given tide record route image.
example duty prototype
bool isvalidimage(string filename);
bool isvalidimage(stream imagestream);
Comments
Post a Comment