title: PHP GD poor thumb quality
body: <pre><code>            $tmp_im = imagecreatetruecolor($width, $height);
              $x = $this-&gt;getX();
              $y = $this-&gt;getY();
  
              $w = floor($resize_height * ($x / $y));
              $h = $resize_height;
  
              $this-&gt;tmp_im = imagecreatetruecolor($w, $h);
  
                              imagealphablending($this-&gt;tmp_im, false);
                              imagesavealpha($this-&gt;tmp_im, true);
  
                              imagecopyresampled($this-&gt;tmp_im, $this-&gt;im, 0, 0, 0, 0, $w, $h, $this-&gt;getX(), $this-&gt;getY());
  
              $this-&gt;im = $this-&gt;tmp_im;
  
  
              $hs = floor(($width - $this-&gt;getX())/2);
              $vs = floor(($height - $this-&gt;getY())/2);
  
              imagecopy($tmp_im, $this-&gt;im, $hs, $vs, 0, 0, $this-&gt;getX(), $this-&gt;getY());
  
              $this-&gt;im = $tmp_im;
  </code></pre>
  
  <p>the results is a poor quality resized image, what im doing wrong? i also tried to use a imagejpeg with quality = 100</p>