Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I make a little Tools for save image file to sql..
can i know how big? (in Byte) the data Transfered to SQL ???
Posted
Comments
Tomas Takac 19-Nov-14 7:12am    
You have that image in byte[] I suppose, so how is that you don't know its size?
Schatak 19-Nov-14 7:14am    
Right

1 solution

1.If you are accessing an image from your local system (or LAN) you should use the next method: Image.FromStream() like in the next example:
C#
FileStream fs = new FileStream(imageFileName, FileMode.Open, FileAccess.Read);
Image image = Image.FromStream(fs);

2.If you want to download an image from web by using the image URL, you should use System.Net.WebRequest object.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900