image resize quality

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • windandwaves

    image resize quality

    Hi Folk

    I was just wondering if you do any "thumbnaili ng" (imagecopyresiz ed) of
    images and if you have noticed that the quality is not always that great.

    This is what I use:

    $source = imagecreatefrom jpeg($filename) ;
    $thumb = imagecreatetrue color($w[$portrait][$j],$h[$portrait][$j]);
    imagealphablend ing($thumb, false);
    $source = @imagecreatefro mjpeg($filename );
    imagecopyresize d($thumb, $source, 0, 82, 0, 0, $w[$portrait][$j],
    $h[$portrait][$j], $width, $height);
    @imagejpeg($thu mb, $filename);

    And the images come out rather pixilated...

    TIA
    [color=blue]
    > Nicolaas[/color]


  • Nicholas Sherlock

    #2
    Re: image resize quality

    windandwaves wrote:[color=blue]
    > $source = imagecreatefrom jpeg($filename) ;
    > $source = @imagecreatefro mjpeg($filename );[/color]

    You're loading your source image twice.

    Cheers,
    Nicholas Sherlock

    Comment

    • samudasu

      #3
      Re: image resize quality

      Use imagecopyresamp led instead of imagecopyresize d and get rid of
      imagealphablend ing unless you really need it.

      Comment

      Working...