Beste mensen,
imagejpeg toont nu de foto in een ander formaat.
Ik zou willen dat imagjpeg de foto niet toont.
<?php
$filename = 'test.jpg';
$width = 400;
$height = 400;
header('Content-type: image/jpeg');
list($width_orig, $height_orig) = getimagesize($filename);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig) {
$width = $height*$ratio_orig;
}
else {
$height = $width/$ratio_orig;
}
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
// Output
$toonniet = imagejpeg($image_p, "thumbnails/bestand.jpg", 100);
imagedestroy($image_p);
?>
Ik ben nu al een tijdje aan het zoeken maar ik kom er niet goed uit.
Alvast bedankt.
480 views