Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: displaying user pictures w/o distortion
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

work mule
Senior Member

USA
1358 Posts

Posted - 27 March 2001 :  00:05:21  Show Profile
This one is really simple.

The Snitz forum, pop_profile.asp hardcodes the image tag for the users picture to width=150 height=150. The problem is that users will likely have to create a picture specifically for that size to put on a Snitz forum to keep it from looking funny or distorted. If you really need to control the image size for design purposes, then that's fine, but if you don't, then read on....

The fix? Simple. Choose which one is more important - To control the width or to control the height. Set the one you chose to the desired size and delete the other attribute. The image tag can be found at Line 152.

If you choose width, some users will have pictures that are short and some will be taller. If you choose to control height, then you will have some that may be narrower and some wider. It all depends on the image. This small change will allow the image to maintain its proportions and not become distorted.

Also, keep in mind that just because an image may be displayed as a thumbnail, if the original is 300KB, it's still 300KB regardless of how it displays on the page.

Like I said, it's really simple. Try it!!

work mule
Senior Member

USA
1358 Posts

Posted - 27 March 2001 :  00:19:44  Show Profile
This had been previously discussed back in this topic:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=3761

There was a reference to an article at 4guysfromrolla.com that discussed about proportional image resizing. In the article though, it was assumed that you would know what the image height and width is before you display it. Here we don't know. The images are coming in from another site so we have know way of knowing the size, unless we make the user put the dimensions in, but what a pain that would be.

Proportional Image Resizing within a Constrained Area
http://www.4guysfromrolla.com/webtech/011201-1.shtml

Oh - this should be compatible with all browsers. Have I tested? Only a couple (IE 4 & 5 PC, Netscape 4.7 PC, Opera PC, IE 4.5 & 5.0 MAC), but I'm confident it'll work. Also, just think back to images you've seen where you knew the width and height attributes were wrong.

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 27 March 2001 :  02:03:13  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
well-explained, cool

This was exactly what I did. I just never thought of writing it up.

Very simple and it works, what more can you ask for [:D)]

- Alan
www.iamviet.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07