Create a new image from GD2 file or URL in PHP
Description
The following code shows how to create a new image from GD2 file or URL.
Example
<?php/*from w ww. j a va2 s . com*/
// Load the gd2 image
$im = imagecreatefromgd2('./test.gd2');
// Apply an effect on the image, in this
// case negate the image if PHP 5+
if(function_exists('imagefilter'))
{
imagefilter($im, IMG_FILTER_NEGATE);
}
// Save the image
imagegd2($im, './test_updated.gd2');
imagedestroy($im);
?>