imagecreatefromgd

Create a new image from GD file or URL

&reftitle.description; ``GdImage``false```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.changelog;

&Version; | &Description;
8.0.0 | On success, this function returns a `GDImage` instance now; previously, a `resource` was returned.

&reftitle.examples;

### `imagecreatefromgd` example

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

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

    // Do image operations here

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

&reftitle.notes; &gd.deprecated.gd-formats;