I have this code:
echo PHP_INT_MAX . '<br/>';
echo 174400 * 249600 . '<br/>';
$img = imagecreatetruecolor(174400, 249600);
and it gives me this output:
9223372036854775807
43530240000
Warning: imagecreatetruecolor(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in /home/bartek/Documents/WWW/WOF/application/controllers/EditorController.php on line 53
The first question is why imagecreatetruecolor is failing gracefully? And the second question is what can I do about it? How can I create big images in PHP?