in reply to getting the dimensions of a picture (jpeg)

Sorry for the necromancy, but since it wasn't mentioned yet, there is now also Imager, a well-maintained module that is an alternative to Image::Magick - IMHO although it may not be as feature-rich as Magick, it's got enough features, and it seems easier to install. For this task, see getwidth and getheight in Imager::ImageTypes, and scale in Imager::Transformations.