protected function isGDResource($resource)
    {
        if (!is_resource($resource)) {
            return false;
        }

        if (strtolower(get_resource_type($resource) != 'gd')) {
            return false;
        }

        return true;
    }
protected function isGDResource($resource)
    {
        if (!is_resource($resource)) {
            return false;
        }

        if (strtolower(get_resource_type($resource) != 'gd')) {
            return false;
        }

        return true;
    }
protected function isGDResource ( $ resource ) { if ( ! is_resource ( $ resource ) ) { return false ; } if ( strtolower ( get_resource_type ( $ resource ) != 'gd' ) ) { return false ; } return true ; }
Check if the passed resource is a gd resource.

@param mixed $resource

@return bool
Check if the passed resource is a gd resource .