FroztSpectre
Arch-Supremacy Member
- Joined
- Dec 7, 2007
- Messages
- 15,275
- Reaction score
- 197
Background:
I've attempting to create a simple website whereby the user can register and login with his account.
Then the user can upload "items" into the website. The user would need to input the item subject, description, tags, description as well as the image file.
After uploading, he will be able to see his "items" inside the Items Homepage. It will consist of a link to show the Item's Subject, a link to let the user edit the item details, as well as the image.
Here comes the problem, the user might upload a 800x600 picture. Then the item homage would display the 500x500 picture.
If i were to force resize it to 250x250, it would look very distorted... If the image was 50x100, forcing resize to 250x250 would look even more distorted.
So i was wondering, if there is any way to check for the image's dimension. If the dimension is above 300x300, the image would be resized (according to ratio), to below 300x300. If the dimensions is below 300x300, it would not resize the image.
One of the ways which i thought of is Thumbnails, or something like the current HardWareZone's feature.
I've attempting to create a simple website whereby the user can register and login with his account.
Then the user can upload "items" into the website. The user would need to input the item subject, description, tags, description as well as the image file.
After uploading, he will be able to see his "items" inside the Items Homepage. It will consist of a link to show the Item's Subject, a link to let the user edit the item details, as well as the image.
Here comes the problem, the user might upload a 800x600 picture. Then the item homage would display the 500x500 picture.
If i were to force resize it to 250x250, it would look very distorted... If the image was 50x100, forcing resize to 250x250 would look even more distorted.
So i was wondering, if there is any way to check for the image's dimension. If the dimension is above 300x300, the image would be resized (according to ratio), to below 300x300. If the dimensions is below 300x300, it would not resize the image.
One of the ways which i thought of is Thumbnails, or something like the current HardWareZone's feature.