Grafika\Gd\Image::_createPng PHP Method

_createPng() private static method

Load a PNG image.
private static _createPng ( string $imageFile ) : Image
$imageFile string File path to image.
return Image
    private static function _createPng($imageFile)
    {
        $gd = @imagecreatefrompng($imageFile);
        if (!$gd) {
            throw new \Exception(sprintf('Could not open "%s". Not a valid %s file.', $imageFile, ImageType::PNG));
        }
        $image = new self($gd, $imageFile, imagesx($gd), imagesy($gd), ImageType::PNG);
        $image->fullAlphaMode(true);
        return $image;
    }