News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to limit avatar size with maintaining its ratio?

Started by shark, October 14, 2005, 06:17:32 PM

Previous topic - Next topic

shark

Currently im using 0x0 (no limit).
So some ppl upload real big avatar, then the scrollbar appear.
I'd like to limit it to 100x100, with the original avatar's aspect ratio.

My problem is:
When i put 100x100, SMF automatically resize the image to 100x100 (square) without maintaining the ratio. How can i change it such that the ratio can be the same as the original image?

I'm using SMF 1.1 RC1. Please help.

Oldiesmann

Only set one of those limits to 100 - maximum height or maximum width. Otherwise they'll get resized to 100x100.

sirwoogie

Well, that is part of the issue I have as well with SMF 1.1RC2. Say I've set avatar sizes to 120x120. Someone links their avatar from a URL and that image is 65x65. I've also set "let the HTML resize it." What happens is no matter what, the image is stretched to 120x120 irrespective of how small the original size was.

Is there a way to stop that from happening? I don't want to have a "download and resize" because that behaves the same way (and also pitches the animation of GIF for the GD conversion to PNG which irritates the users).

Advertisement: