Automatic Picture Resize proposal

ImProviser at 10h31
18
Feb
2009
If the picture is larger than XXX*XXX px then it will be resized to a smaller version with the upper text in this format: (align left) Size:XXX*XXX, (align right) Click on the image to view it in the full size.


How it really looks like on one of the forums:


See the upper pictures ^
1 Acid, on 18/02/2009 at 10h53
Great idea!!
I voted yes.
2 ImProviser, on 18/02/2009 at 19h15
anyone else with the votes :S?
3 Tarogasini, on 18/02/2009 at 19h32
Sure, why not. That would help to those who dont know how to resize pics manually.
4 Dreamlimix, on 18/02/2009 at 19h35
I voted yes!
5 Master Marc, on 18/02/2009 at 19h45
I voted yes
6 Rok, on 18/02/2009 at 20h31
Great Idea! Yes Very Happy.
7 bryan739182, on 18/02/2009 at 21h24
yes!
8 Blofeld, on 18/02/2009 at 21h37
I voted yes good suggestion. Smile
9 ImProviser, on 18/02/2009 at 22h37
Tarogasini wrote:Sure, why not. That would help to those who dont know how to resize pics manually.


I must disagree with this... If you want to upload high res picture and not to use thumbail as size of it (its really small) than this is the best way (my modest opinion) to do so... Wink

Thanks for the votes
10 :)tayne:), on 18/02/2009 at 22h40
great idea > voted yes!
11 ImProviser, on 19/02/2009 at 00h09
Code:
<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>


And i have NO idea could that be usefull or where should it be placed :/

anyways it looks like this

http://jordan.husney.com/
12 thunderboyx, on 19/02/2009 at 00h59
Voted yes =D
13 DeathSoul, on 19/02/2009 at 13h10
Voted yes we need this!
14 :)tayne:), on 19/02/2009 at 17h07
13 people have voted yes and 0 voted no. We might get this feature if more people vote!
15 Tarogasini, on 19/02/2009 at 18h36
There is 18.100 members registered on forumotion. What are the odds we will get this, even if 100 more people vote yes ? Sad
16 ImProviser, on 21/02/2009 at 02h16
bump
17 ParadiseKid, on 21/02/2009 at 02h18
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.
18 magicm00n, on 21/02/2009 at 02h37
Voted yes. Smile
19 Doctor Inferno, on 21/02/2009 at 09h35
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 ? Sad


Even if everyone were to vote, the techs would simply choose which suggestion they like, not what we like.
20 ImProviser, on 21/02/2009 at 10h49
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.


this isn't up to servimg... Wink if you use [code] codes it automatically resizes the image to the allowed size... proportional of course... I've seen it on couple forums so its not up to servimg Wink
Similar topics
see to big make my forum ugly normal page
I think you know the problem please help me
Not sure if this would be a high priority; but considering Library mode on xbox is memory hungry, if there could be an option to download fanart and have it resized to: 960X540 1280x720 or keep original 1920 x 1080 As the majority, if not all,
Replies 1 to 20 on 42 for "Automatic Picture Resize proposal"
123
See also
more_less
Informations

42 Replies For the topic :
"Automatic Picture Resize proposal"

This topic has been viewed 1329 times.

Last message :
18/02/2009 at 10h31 by "ImProviser"