Hi, I have a form to upload images one at a time with text to a mysql database table, but I need to resize these images before adding them to the table, I want to retain aspect ratio and I need it to always resize the longest side of the image. So a portrait or landscape image will be resized to 300 on its longestside and wil retain aspect ratio.
Can anyone help?

Thanks for looking...................

5 Years
Discussion Span
Last Post by DarkMonarch

checkout imagecopyresampled , look at example 1.
Do you want to add the images to to the database?
It's often better (faster) to save the image to a special dir and just store the filname in the database.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.