Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get height or width of image

Status
Not open for further replies.

DeZiner

Programmer
Joined
May 17, 2001
Messages
815
Location
US
I use cffile to upload an image, if this information will help.

Anyway the user uploads an image and if it is larger than 100 px wide I want to add a width parameter to the image tag when I display it. I do not want to resize the actual file however. Any ideas? DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
what we tend to do is to allow the user to upload any size image (within reason of course) and then set the width of the image on the frontend of the website. then IE and netscape scale the image quite well. so in your case you could set the width to 100px.

there is a CF tag that will do the same thing but it will make a new image of the one that you have got but to the dimensions that you require. have a look on macromedia developers section for CFJPEG

hope this helps !
 
I only want to change the size if absolutely needed. File size could get out of hand even if the pictures are small. I'll check it out though. Thanks! DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top