i'm trying to load image from local disk, and it's working. But my problem is that i'd like to check if image size is valid or not before loading , and if not - then MessageBox.Show("No image!");
say if image size is zero it should say like "Invalid Image"
and is it possible to check the file extension also
Note this is for checking size of file on disk
MSDN FileInfo.Length says that it is "the size of the current file in bytes."
or
You can get the size of image like
Get size of file on disk
or
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/85bf76ac-a254-41d4-a3d7-e7803c8d9bc3
and putting this thing in if you can show the msg you want
Getting image dimensions without reading the entire file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With