![Automatic Picture Resize proposal Proposal](https://2img.net/h/www.dodaj.rs/f/l/cy/4aIfI7Da/proposal.png)
How it really looks like on one of the forums:
![Automatic Picture Resize proposal Proposal2](https://2img.net/h/www.dodaj.rs/f/3f/Cj/2HwmRVji/proposal2.png)
See the upper pictures ^
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
Tarogasini wrote:Sure, why not. That would help to those who dont know how to resize pics manually.
<script type="text/javascript">
function podImageClass() {
if ( !(this instanceof podImageClass) ) return new podImageClass();
var browser;
var podImage;
var podImageHeight;
var podImageWidth;
var podImageAspect;
var debounceResize = 0;
var haveResized = 0;
function __setViewOriginalLink(displayBool) {
var voLink = document.getElementById("podImageViewOriginalLink");
if (displayBool) {
voLink.innerHTML =
'<a href="javascript:podImage.setOriginalSize()">' +
"Scale to Original Size" + "</a>";
} else {
voLink.innerHTML = ' ';
}
}
function _setText () {
var podImageText = '"<$MTEntryTitle$>"' + " / " +
"Click For Previous";
podImage.alt = podImageText;
podImage.title = podImageText;
}
function _setSize() {
var myWidth = 0, myHeight = 0;
if (debounceResize) {
debounceResize = 0;
return;
}
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement &&
( document.documentElement.clientWidth ||
document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth ||
document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
// Only do the resize if we've done this before or if our
// image is greater than their window size 64px of top margin.
if ( !( haveResized || ((podImageHeight + 64) > myHeight) ) ) {
return;
}
// allow 128px margins on top and bottom:
var newImageHeight = myHeight - ( 2 * 128 );
if ( (podImageHeight + 64) < myHeight ) {
// Just use original width and height;
_setOriginalSize();
} else {
// Downscale:
if (newImageHeight > 0) {
var newImageWidth = newImageHeight * podImageAspect;
podImage.width = newImageWidth;
podImage.height = newImageHeight;
}
__setViewOriginalLink(true);
}
haveResized = 1;
}
function _setOriginalSize() {
// We have to play with the onresize handler to work
// around IE sending spurious events.
window.onresize = null;
podImage.width = podImageWidth;
podImage.height = podImageHeight;
__setViewOriginalLink(false);
if (browser == "MSIE") {
debounceResize = 1;
}
window.onresize = _setSize;
}
function _checkIt(string)
{
var detect = navigator.userAgent.toLowerCase();
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
function _init() {
if (_checkIt('msie')) browser = "MSIE"
else browser = "Other";
podImage = document.getElementById("podImage");
podImageWidth = podImage.width;
podImageHeight = podImage.height;
podImageAspect = (podImageHeight > 0) ?
(podImageWidth / podImageHeight) : 0;
}
this.init = _init;
this.setText = _setText;
this.setSize = _setSize;
this.setOriginalSize = _setOriginalSize;
_init();
}
<!-- setup podImage class: -->
var podImage;
addLoadEvent(function() {
podImage = podImageClass();
podImage.setText();
podImage.setSize();
window.onresize = podImage.setSize;
});
</script>
Tarogasini wrote:There is 18.100 members registered on forumotion. What are the odds we will get this, even if 100 more people vote yes ?
ParadiseKid wrote:How is Forumotion going to pull this off? Your images on hosted on ServIMG.com. So really, this is a suggestion for ServIMG.
I need more convincing before I vote.
13gentj wrote:Well I have not voted because the people who are more expirienced who know how to resize our pictures won't be able to get them the size that we want. I would vote yes if it was optional. I do think that this would be good for avatars that are too big. But until you explain me the questions that I have asked I will not vote.
Runescape4 wrote:Well,
You might think i am dumb but i voted no.
Because you could just change the Seize of the image on like
bannermaker.com
Photoshop.com
I voted no.
If there was a maybe i would of voted.