Hey all,
Ive got a problem ill try explain it as best I can but its quite dodgy.
A user submits and image of size width = 90 and height = 271
The image is displayed on the wesbite in a table cell width=150 height=120
The image needs to be reduced but not streched or outof proportion.
The only way I can think of doing it is with math 😃 -
271 / 150 = 1.806
90 / 1.806 = 49.833
so the height should be 150 and the width of the image should be set to 49.833 - This would work if I coded it, im must admit im proud 😃 but is there an easier and less dirty way of reducing images in proportion. I am not sure if my webhost has the gd libaries installed, but if you have a way of doing it with gd tell me and i will find out.
Thanks!!
Jack.