When the image is not a JPG file, and its file size is smaller than MAX_FILE_SIZE, but the pixels might still larger than MAX_IMAGE_SIZE, will it cause OOM?

In my test, a PNG has pixels larger than MAX_IMAGE_SIZE, size smaller than MAX_FILE_SIZE does cause OOM, maybe we should also consider MAX_IMAGE_SIZE for the images that are not JPG, too?