note 46591 deleted from function.imagejpeg by aidan
| From: | aidan@php.net | Date: | Sat, 16 Oct 2004 14:26:13 +0000 |
| Subject: | note 46591 deleted from function.imagejpeg by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78661@lists.php.net to get a copy of this message | ||
Note Submitter: jan(at)sequens(dot)net
----
I have a problem with imagejpeg() function:
This works:
<?php
$original = imagecreatefromjpeg("makro_1.jpg");
$small = imagecreatetruecolor(160, 120);
imagecopyresampled($small, $original, 0, 0, 0, 0, 160, 120, 1600, 1200);
header("Content-type: image/jpeg");
imagejpeg($small);
?>
and this doesn't:
<?php
$original = imagecreatefromjpeg("makro_1.jpg");
$small = imagecreatetruecolor(160, 120);
imagecopyresampled($small, $original, 0, 0, 0, 0, 160, 120, 1600, 1200);
$thumb = "tn.jpg";
imagejpeg($small, $thumb);
echo '<img src="' . $thumb . '">';
?>
Browser shows just a place for an image (because of <img> tag) with a red cross inside,
beacuse the image wasn't found. Are images saved to a file by imagejpeg() function saved
permanently or just temporarily? And where? Thanks... SQ