Saw this while trying to figure out why an animated GIF image that was
being uploaded by one of my customers was rejected.
The image being uploaded matched the "max width" and "max height" for
the image filter _exactly_, but that DFV::F::Image was still resizing
the image.
By resizing the image, it got pumped through ImageMagick, which then
caused the resulting file size to *grow*; the original uploaded image
was ~24KBytes, but the one that ImageMagick spat out was ~44KBytes. It
_looks like_ ImageMagick remapped the animation frames in the GIF and
that caused the file size to increase.
I'd like to submit a patch, but wasn't sure what the purpose of the
undocumented "@the_rest" was in "__shrink_image()". Well, I see what
its for, but can't see where its being used (in part because its
undocumented).
As the documentation reads, I get the impression that the image will be
resized *down* to fit within the given size restrictions. If the image
fits within the restrictions, though, I read the docs as implying that
no resize is necessary.
Can we just short-circuit this so that if the image height/width already
fits within the given bounds that we just exit early without doing
anything to the provided image?