How come picture quality gets blurred?

Discussion in 'JavaScript' started by tptnyc, Jun 9, 2011.

  1. #1
    Why picture quality gets blurred us in g this script? How to fix that?

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    $('img').mouseover(grow);
    $('img').mouseout(shrink);
    });

    function grow(){
    $(this).css('height','240px');
    }

    function shrink(){
    $(this).css('height','165px');
    }
    </script>
     
    tptnyc, Jun 9, 2011 IP
  2. screamer

    screamer Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    different browsers use different approximation algorithms for resizing images. It cannot be fixed unfortunately. Use thumbnails instead of resizing the original images.
     
    screamer, Jun 9, 2011 IP