Thanks for the tip on Image::GD::Thumbnail. I actually used it in this project, but I think I'm going to modify it to allow me to constrain width or height independently and calculate the other dimension automatically. It would definitely be more useful that way.