in reply to getting the dimensions of a picture (jpeg)
If all you want to due is find the image's size, try Image::Size. This will not resize the image for you, but it will tell you it's width and hight in pixels.