static public function createFromResource($resource) {
		if (!is_resource($resource))
			throw new Exception('Invalid (resource) parameter! This is not a resource!');
		if (get_resource_type($resource) != 'gd')
			throw new Exception('Invalid (resource) parameter! Resource is not a gd resource!');
		return new self($resource);
	}