[PHP] ImageCreateTrueColor background always gets black and JPEG vs. PNG color difference
Hi, Could anyone tell why my background colors with ImageCreateTrueColor() are becoming black ? I use the following script: If I use ImageCreate(), the color becomes yellow as expected. This is with GD 2.0.4 (conf-opts: http://s003.widexs.nl/phpinfo.php) Any help appreciated :) Another question: Is it correct that JPEG images are showing up very ugly compared to the same code with PNG? See http://s003.widexs.nl/gd-test-png.php and http://s003.widexs.nl/gd-test-jpeg.php The source is the above code, but with ImageCreate() instead of ImageCreateTrueColor(), and with jpeg instead of png for the gd-test-jpeg.php script. -- Met vriendelijke groet/With kind regards, Wouter de Jong System-Administrator CABLE & WIRELESS Delivering the Internet promise(tm) URL:http://www.widexs.nl Email: [EMAIL PROTECTED] Tel:+31 (0) 23 5698070 Fax:+31 (0) 23 5698099 *** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ImageCreateTrueColor background always gets black and JPEG vs. PNG color difference
On Tue, Oct 29, 2002 at 07:51:21AM -0500, [EMAIL PROTECTED] wrote: > >From the gd manual at boutell.com: Hmm, that was one place I didn't look at :( *stupid* > Truecolor images are always filled with black at creation time. There is > no concept of a "background" color index. > > I suppose you'll have to use a function like imagefill to get your yellow > background. Thanks, This works idd. :) > -Josh -- Met vriendelijke groet/With kind regards, Wouter de Jong System-Administrator CABLE & WIRELESS Delivering the Internet promise(tm) URL:http://www.widexs.nl Email: [EMAIL PROTECTED] Tel:+31 (0) 23 5698070 Fax:+31 (0) 23 5698099 *** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php