Hallo,
ich habe mir folgendes php Script zusammenkopiert:
$src = "burgtor.jpg";
$quellbild = imagecreatefromjpeg($src);
// Abmessungen Quellbild
$weite = imagesx($quellbild);
$hoehe = imagesy($quellbild);
// Abmessungen Zielbild Standard
$weitet = 720;
$hoehet = 405;
// Abmessungen Zielbild Preview
$weitep = 294;
$hoehep = 165;
// Einstellungen für Scharfzeichnung mit imageconvolution
$sharpenMatrix = array(-1,-1,-1,-1,1,-1,-1,-1,-1);
$divisor = 8;
$offset = 0;
// Standard
$standard = imagecreatetruecolor($weitet,$hoehet);
imagecopyresampled($standard, $quellbild, 0, 0, 0, 0, $weitet, $hoehet, $weite, $hoehe);
imageconvolution($standard, $sharpenMatrix, $divisor, $offset);
header('Content-Type: image/jpeg');
imagejpeg($standard, "standard/burgtor.jpg", 100);
imagedestroy($standard);
// Standard
$preview = imagecreatetruecolor($weitep,$hoehep);
imagecopyresampled($preview, $quellbild, 0, 0, 0, 0, $weitep, $hoehep, $weite, $hoehe);
imageconvolution($preview, $sharpenMatrix, $divisor, $offset);
header('Content-Type: image/jpeg');
imagejpeg($preview, "preview/burgtor.jpg", 100);
imagedestroy($preview);
Das berechnen der Bildgrößen funktioniert auch problemlos - aber imageconvolution bzw. meine Versuche das Bild zu schärfen funktionieren überhaupt nicht. Gibt aber auch keinen Fehler und bricht nicht ab. Das Bild ist nur absolut identisch. GD Version ist 2.0.34
Wenn jemand einen Hinweis hat wäre ich dankbar.
Andreas