|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-28 18:09 UTC] rasmus@php.net
[2003-03-21 08:23 UTC] antoine at rezo dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 13:00:01 2025 UTC |
The function ImageCreateTrueColor() will cause a fatal error when it detects that an incorrect version of GD is installed. Since the php code cannot investigate which version of GD is installed before this call is made, this makes it impossible to create applications which can gracefully degrade depending on the version of GD installed. The fatal error is inconsistent with the warnings that are returned when GIF,PNG, or JPEG support is not compiled into GD. The return value for all these functions should be a warning to allow maximum flexibility to the programmer. if (! $Image = ImageCreateTrueColor($w,$h)) { $Image = ImageCreate($w,$h); } It is not possible to execute the above code because the fatal error when GD 2.0 is not installed will cease execution of the code.