|
Hi,
I run an Image hosting website, and am a beginner at javascript.
I have a viewing page where users can view an uploaded image in my site. When users upload large images (in terms of dimensions)
it breaks the layout of the page. I did think of using the height and width attributes for the image tags, but then small images are stretched. I have a flash image viewer which works well, but it only works with jpeg images. gif, png and bmp images still suffer the same problem.
I would like to be able to set the maximum image width, but get smaller for the smaller images. I think there may be a solution in javascript, but am not sure how I would go about it. I also thought of using server-side scripting to set the image size attributes, my site uses coldfusion and i'm not aware of any way to get it to find the dimensions of the image.
Thanks.
|
|
|
|
|
|
|
|