GdkPixbuf.PixbufAnimation.new_from_file
Description: Reference for GdkPixbuf.PixbufAnimation.new_from_file

### Constructor

# GdkPixbuf.PixbufAnimation.new_from_file

#### Declaration [src]

    GdkPixbufAnimation*
    gdk_pixbuf_animation_new_from_file (
      const char* filename,
      GError** error
    )

#### Description [src]

Creates a new animation by loading it from a file.

The file format is detected automatically.

If the file’s format does not support multi-frame images, then an animation with a single frame will be created.

Possible errors are in the `GDK_PIXBUF_ERROR` and `G_FILE_ERROR` domains.

#### Parameters

`filename` | `const char*`
| Name of file to load, in the GLib file name encoding
| Ownership is not transferred to the callee
| The string is a file system path, using the OS encoding

#### Return value

Returns: `GdkPixbufAnimation`
A newly-created animation
Ownership of the data is transferred to the caller
Can be `NULL`