hi
I want to resize image with PHP. i'm using this script:
$filename = '1.jpg';
//the resize will be a percent of the original size
$percent = 5;
// Content type
// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
$quality=100;
// Output and free memory
//the resized image will be 400x300
imagejpeg($thumb, "3php.jpg", $quality);
imagedestroy($thumb);
as you see in attached files, the result of php resizer is difference when I resize it with photoshop.
photoshop make a fade stroke outline of text in image when it resized but text in image that resized with php is sharp.
I need same result of photoshop resizer. how do I it with php?
Orginal file:
[ATTACH]5205[/ATTACH]
resized with photoshop:
[ATTACH]5209[/ATTACH]
resized with PHP:
[ATTACH]5207[/ATTACH]
thanks
1.jpg
3php.jpg
3photoshop.jpg