The problem is with line
imageWidth = 1 * Convert.ToInt32(Label1.Text);
Label1.Text
may or may not be int. Check.
Use Int32.TryParse(value, out number)
instead. That will solve your problem.
int imageWidth; if(Int32.TryParse(Label1.Text, out imageWidth)) { Image1.Width= imageWidth; }