Awesome, so if the uploaded image is already at or below the maximum size setting, it won't touch it at all?
That's been a pet peeve of mine ever since I bought Gallery and started messing with it on my test board. Just seemed like bad behavior to re-compress images for no reason, so I'm glad this is taken care of.
Now, to expand on my idea on the original images...
Basically, I'm thinking Flickr. On Flickr, if you upload an image larger than their Large preset, it creates all the resized versions (Large, Medium (photo page display size), and Thumbnail. But it keeps the original. The uploader can select their settings to allow the Original image to be downloaded by anyone, only registered Flickr members, or only themselves.
The current "Maximum image size" could be renamed "Maximum size for Large image"
With that, you would have the current functionality work pretty much the same, with the photo page displaying the resized Medium image, clicking it opening the Large, but then having a link/icon to download the original, for photos that were larger than the maximum setting for Large, if the uploader allowed it. Very Flickr-style with how they handle the originals.
That way, you could keep the original without changing the existing functionality, to be downloaded by users if the uploader allows, and to use when regenerating the smaller versions, so you get the best quality instead of regenerating from a compressed one. Obviously this would have to have an ACP setting to disable it entirely, for boards lacking the disk space to keep all those huge original files, and I don't know how feasible this would be to add in. Just some food for thought.