Added max_size check to StdImageSize.