public static ImageSize stringToSize(string input)
{
string[] parsed = input.Split('x');
if (parsed.Length != 2)
throw new FormatException();
uint width = Convert.ToUInt32(parsed[0]);
uint height = Convert.ToUInt32(parsed[1]);
return new ImageSize(width, height);
}
}