### Constructor

# Gdk.Texture.new_from_resource

#### Declaration [src]

    GdkTexture*
    gdk_texture_new_from_resource (
      const char* resource_path
    )

#### Description [src]

Creates a new texture by loading an image from a resource.

The file format is detected automatically. The supported formats are PNG and JPEG, though more formats might be available.

It is a fatal error if `resource_path` does not specify a valid image resource and the program will abort if that happens. If you are unsure about the validity of a resource, use `gdk_texture_new_from_file()` to load it.

#### Parameters

`resource_path` | `const char*`
| the path of the resource file
| Ownership is not transferred to the callee
| The string is a NUL terminated UTF-8 string

#### Return value

Returns: `GdkTexture`
A newly-created `GdkTexture`
Ownership of the data is transferred to the caller