class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I've discovered something strange. I really don't understand it. Apparently portrait images sometimes do get resized correctly.
When I upload an image with a resolution of 1944 x 2592 (width x height), the image gets resized correctly. (it fits into the container of 450 x 600 pixels)
When I upload an image (a photo) with a resolution of 1200 x 1600 (width x height), the image gets resized correctly.(it also fits into the container of 450 x 600 pixels)
The strange thing is: when I upload an image I made using photoshop (saved as .jpg) with a resolution of 1200 x 1600 (width x height), the image does fit into the container of 450 x 600 pixels, but only the image is rotated 90 degrees CC within te container.Reply
It is because the image orientation is embedded into the JPEG meta-data. Your image is rotated in reality, but Photoshop reads the meta-data, and un-rotates it to display it as it was taken.
The class doesn't support yet reading these meta-data.Reply
When I upload an image with a resolution of 1944 x 2592 (width x height), the image gets resized correctly. (it fits into the container of 450 x 600 pixels)
When I upload an image (a photo) with a resolution of 1200 x 1600 (width x height), the image gets resized correctly.(it also fits into the container of 450 x 600 pixels)
The strange thing is: when I upload an image I made using photoshop (saved as .jpg) with a resolution of 1200 x 1600 (width x height), the image does fit into the container of 450 x 600 pixels, but only the image is rotated 90 degrees CC within te container.
The class doesn't support yet reading these meta-data.