con: System.Drawing

codice:
int w = 0, h = 0;

Image img = Image.FromStream(<stream-immagine>);

w = img.Width;
h = img.Height;