Get image size in Kb using c# | Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

Get image size in Kb using c#

Monday


Get image size in Kb in asp.net using c#:
                                                            Use FileInfo and the Length property to measure file size.  Here is the code for  get the file size in your C# program easily. The blow sample contain code for get image size in KB and MB.

  FileInfo fileInfo = new FileInfo(Server.MapPath("~/Images/Header.jpg"));
double 
fileSizeKB fileInfo.Length / 1024;
double 
fileSizeMB fileInfo.Length / (1024 1024);

0 comments:

Post a Comment

Share your thoughts here...

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets