imagecreatefromgd

Create a new image from GD file or URL

&reftitle.description; `resource` `imagecreatefromgd` `string` `filename`

Create a new image from GD file or URL.

&tip.fopen-wrapper;
&reftitle.parameters;

`filename`

- Path to the GD file.

&reftitle.returnvalues;

&gd.return.identifier;

&reftitle.examples;

### `imagecreatefromgd` example

    <?php
    // Load the gd image
    $im = @imagecreatefromgd('./test.gd');

    // Test if the image was loaded
    if(!is_resource($im))
    {
         die('Unable to load gd image!');
    }

    // Do image operations here

    // Save the image
    imagegd($im, './test_updated.gd');
    imagedestroy($im);
    ?>

&reftitle.notes; &warn.no-win32-fopen-wrapper;