Is there a way to dynamically define how an image appear in a page or in certain layout?

Posted by Starx on Stack Overflow See other posts from Stack Overflow or by Starx
Published on 2010-05-17T08:02:05Z Indexed on 2010/05/17 8:30 UTC
Read the original article Hit count: 221

For so many time, I have encountered problems with managing image having abnormally long height or width.

If I fixed their height and widht, they will appear streched?

If I fixed their width, and if the height of the image is very long then also it will mess up the overall website.

If I fixed their height, and if the width of the image is very long then also it will mess up the overall website.

The images I save in the local drive are saved maintaining the ratio? Let say user decides to upload image 1(height)*32(width). When he uploads this image, the script is made to resize the user uploaded image to height:1000px(just an example)

So the resulting image in 1000px(height)*32000(widht), you see now the image is abnormally large.

Now while displaying this image in a box of 1000px * 1000px, what is the best way to display this image?

© Stack Overflow or respective owner

Related posts about php

Related posts about web-development