This ends up being an issue if the getimagesize function doesn't work on the PHP installation. In that case it just uses the max width/height set in the control panel. You could just set both of those to blank to get around this for now.

Hopefully since we're doing a bit of image stuff with either GD or ImageMagick now we can try getting the image sizes with other options as well if getimagesize doesn't work.