views:

92

answers:

1
byte[] imageBytes = Convert.FromBase64String(base64String);
MemoryStream ms = new MemoryStream(imageBytes, 0,
imageBytes.Length);

How will I determine its file size of an image?

+2  A: 

You should be able to determine the size of the stream pretty easy.

MemoryStream ms = new MemoryStream();
int length = ms.Length;

length is now the length of the stream in bytes. This bytenumber should also be the size of any file you would store that contained only this stream.

Edit:

If you mean in pixels you could use something like:

Image img = Image.FromStream(ms);
int width = img.Width;
int height = img.Height;
Alxandr