Jump to content

PHP Upload original picture, thumbnailed, and mysql entries


dezkit

Recommended Posts

Personally, I would upload the image with a unique name to a predefined folder, insert the text data into the database and for the thumbnail:

 

Set maximum dimensions, eg. 500px by 500px

Find the quotient of the side that is greater in difference to the maximum (side/difference) (when the side is longer than the maximum) eg. 750px by 600px would be 1.5

Divide both sides by the quotient. 750/1.5=500, 600/1.5=400

That would be the thumbnail size.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.