Imagejpeg not coming out full-color
| From: | Liam Gibbs | Date: | Tue, 15 Apr 2003 01:55:48 +0000 |
| Subject: | Imagejpeg not coming out full-color | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143857@lists.php.net to get a copy of this message | ||
My thumbnails aren't coming out in full-color when I copy them from already-existing images.
Now, before you say 'check out imagecreatetruecolor()', that's what I'm talking
about. The code I'm using is pasted below (with error handling and such removed). I'm
using imagecreatetruecolor(), but it seems that the images are still coming out with minimal colors,
same as with imagecreate(). Any thoughts?
$thumbnailfile = imagecreatetruecolor($logothumbnailwidth, $logothumbnailheight);
$logofile = imagecreatefromjpeg("Logos/$logofile");
imagecopyresampled($thumbnailfile, $logofile, 0, 0, 0, 0, $logothumbnailwidth, $logothumbnailheight,
$logopicwidth, $logopicheight);
imagejpeg($thumbnailfile, $thumbnaillocationfile);
imagedestroy($thumbnailfile);
imagedestroy($logofile);