Re: Imagejpeg not coming out full-color

From: Date: Tue, 15 Apr 2003 07:36:47 +0000
Subject: Re: Imagejpeg not coming out full-color
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143874@lists.php.net to get a copy of this message
On Tuesday 15 April 2003 09:55, Liam Gibbs wrote: > 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); Well your code seems to work OK for me (PHP 4.3.0 using the bundled GD lib and libjpeg 6b). - Try just reading and writing a jpeg file without the resizing - Try jpegs created from different sources - Read user comments in the online manual to see whether there are any issues regarding the functions used in your code - Search bugs.php.net to see whether there are any issues regarding those functions with the version of PHP you're using -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* NOWPRINT. NOWPRINT. Clemclone, back to the shadows again. - The Firesign Theater */

« previous php.general (#143874) next »