EogImage

## EogImage EogImage |

## Synopsis

    enum                EogImageData;
    #define             EOG_IMAGE_DATA_ALL
    enum                EogImageError;
    #define             EOG_IMAGE_ERROR
    enum                EogImageMetadataStatus;
    enum                EogImageStatus;
                        EogImage;
    GQuark              eog_image_error_quark               (void);
    EogImage *          eog_image_new                       (const char *txt_uri);
    EogImage *          eog_image_new_file                  (GFile *file);
    gboolean            eog_image_load                      (EogImage *img,
                                                             EogImageData data2read,
                                                             EogJob *job,
                                                             GError **error);
    void                eog_image_cancel_load               (EogImage *img);
    gboolean            eog_image_has_data                  (EogImage *img,
                                                             EogImageData data);
    void                eog_image_data_ref                  (EogImage *img);
    void                eog_image_data_unref                (EogImage *img);
    void                eog_image_set_thumbnail             (EogImage *img,
                                                             GdkPixbuf *pixbuf);
    gboolean            eog_image_save_as_by_info           (EogImage *img,
                                                             EogImageSaveInfo *source,
                                                             EogImageSaveInfo *target,
                                                             GError **error);
    gboolean            eog_image_save_by_info              (EogImage *img,
                                                             EogImageSaveInfo *source,
                                                             GError **error);
    GdkPixbuf *         eog_image_get_pixbuf                (EogImage *img);
    GdkPixbuf *         eog_image_get_thumbnail             (EogImage *img);
    void                eog_image_get_size                  (EogImage *img,
                                                             gint *width,
                                                             gint *height);
    goffset             eog_image_get_bytes                 (EogImage *img);
    gboolean            eog_image_is_modified               (EogImage *img);
    void                eog_image_modified                  (EogImage *img);
    const gchar *       eog_image_get_caption               (EogImage *img);
    const gchar *       eog_image_get_collate_key           (EogImage *img);
    ExifData *          eog_image_get_exif_info             (EogImage *img);
    gpointer            eog_image_get_xmp_info              (EogImage *img);
    GFile *             eog_image_get_file                  (EogImage *img);
    gchar *             eog_image_get_uri_for_display       (EogImage *img);
    EogImageStatus      eog_image_get_status                (EogImage *img);
    void                eog_image_transform                 (EogImage *img,
                                                             EogTransform *trans,
                                                             EogJob *job);
    void                eog_image_autorotate                (EogImage *img);
    cmsHPROFILE         eog_image_get_profile               (EogImage *img);
    void                eog_image_apply_display_profile     (EogImage *img,
                                                             cmsHPROFILE display_profile);
    void                eog_image_undo                      (EogImage *img);
    GList *             eog_image_get_supported_mime_types  (void);
    gboolean            eog_image_is_supported_mime_type    (const char *mime_type);
    void                eog_image_file_changed              (EogImage *img);
    gboolean            eog_image_is_file_changed           (EogImage *img);
    EogImageMetadataStatus eog_image_get_metadata_status    (EogImage *img);
    RsvgHandle *        eog_image_get_svg                   (EogImage *img);
    EogTransform *      eog_image_get_transform             (EogImage *img);
    gboolean            eog_image_is_animation              (EogImage *img);
    gboolean            eog_image_is_svg                    (EogImage *img);
    gboolean            eog_image_start_animation           (EogImage *img);

## Object Hierarchy

      GObject
       +----EogImage

## Signals

      "changed"                                        : Run Last
      "file-changed"                                   : Run Last
      "next-frame"                                     : Run Last
      "save-progress"                                  : Run Last
      "size-prepared"                                  : Run Last
      "thumbnail-changed"                              : Run Last

## Description

## Details

### enum EogImageData

    typedef enum {
    	EOG_IMAGE_DATA_IMAGE     = 1 << 0,
    	EOG_IMAGE_DATA_DIMENSION = 1 << 1,
    	EOG_IMAGE_DATA_EXIF      = 1 << 2,
    	EOG_IMAGE_DATA_XMP       = 1 << 3
    } EogImageData;

### EOG_IMAGE_DATA_ALL

    #define             EOG_IMAGE_DATA_ALL

### enum EogImageError

    typedef enum {
    	EOG_IMAGE_ERROR_SAVE_NOT_LOCAL,
    	EOG_IMAGE_ERROR_NOT_LOADED,
    	EOG_IMAGE_ERROR_NOT_SAVED,
    	EOG_IMAGE_ERROR_VFS,
    	EOG_IMAGE_ERROR_FILE_EXISTS,
    	EOG_IMAGE_ERROR_TMP_FILE_FAILED,
    	EOG_IMAGE_ERROR_GENERIC,
    	EOG_IMAGE_ERROR_UNKNOWN
    } EogImageError;

### EOG_IMAGE_ERROR

    #define EOG_IMAGE_ERROR eog_image_error_quark ()

### enum EogImageMetadataStatus

    typedef enum {
      EOG_IMAGE_METADATA_NOT_READ,
      EOG_IMAGE_METADATA_NOT_AVAILABLE,
      EOG_IMAGE_METADATA_READY
    } EogImageMetadataStatus;

### enum EogImageStatus

    typedef enum {
    	EOG_IMAGE_STATUS_UNKNOWN,
    	EOG_IMAGE_STATUS_LOADING,
    	EOG_IMAGE_STATUS_LOADED,
    	EOG_IMAGE_STATUS_SAVING,
    	EOG_IMAGE_STATUS_FAILED
    } EogImageStatus;

### EogImage

    typedef struct _EogImage EogImage;

### eog_image_error_quark ()

    GQuark              eog_image_error_quark               (void);

### eog_image_new ()

    EogImage *          eog_image_new                       (const char *txt_uri);

### eog_image_new_file ()

    EogImage *          eog_image_new_file                  (GFile *file);

### eog_image_load ()

    gboolean            eog_image_load                      (EogImage *img,
                                                             EogImageData data2read,
                                                             EogJob *job,
                                                             GError **error);

### eog_image_cancel_load ()

    void                eog_image_cancel_load               (EogImage *img);

### eog_image_has_data ()

    gboolean            eog_image_has_data                  (EogImage *img,
                                                             EogImageData data);

### eog_image_data_ref ()

    void                eog_image_data_ref                  (EogImage *img);

### eog_image_data_unref ()

    void                eog_image_data_unref                (EogImage *img);

### eog_image_set_thumbnail ()

    void                eog_image_set_thumbnail             (EogImage *img,
                                                             GdkPixbuf *pixbuf);

### eog_image_save_as_by_info ()

    gboolean            eog_image_save_as_by_info           (EogImage *img,
                                                             EogImageSaveInfo *source,
                                                             EogImageSaveInfo *target,
                                                             GError **error);

### eog_image_save_by_info ()

    gboolean            eog_image_save_by_info              (EogImage *img,
                                                             EogImageSaveInfo *source,
                                                             GError **error);

### eog_image_get_pixbuf ()

    GdkPixbuf *         eog_image_get_pixbuf                (EogImage *img);

Gets the GdkPixbuf of the image

`img` : | a EogImage
Returns : | a GdkPixbuf. [transfer full]

### eog_image_get_thumbnail ()

    GdkPixbuf *         eog_image_get_thumbnail             (EogImage *img);

Gets the thumbnail pixbuf for `img`

`img` : | a EogImage
Returns : | a GdkPixbuf with a thumbnail. [transfer full]

### eog_image_get_size ()

    void                eog_image_get_size                  (EogImage *img,
                                                             gint *width,
                                                             gint *height);

### eog_image_get_bytes ()

    goffset             eog_image_get_bytes                 (EogImage *img);

### eog_image_is_modified ()

    gboolean            eog_image_is_modified               (EogImage *img);

### eog_image_modified ()

    void                eog_image_modified                  (EogImage *img);

### eog_image_get_caption ()

    const gchar *       eog_image_get_caption               (EogImage *img);

### eog_image_get_collate_key ()

    const gchar *       eog_image_get_collate_key           (EogImage *img);

### eog_image_get_exif_info ()

    ExifData *          eog_image_get_exif_info             (EogImage *img);

### eog_image_get_xmp_info ()

    gpointer            eog_image_get_xmp_info              (EogImage *img);

Gets the XMP info for `img` or NULL if compiled without libexempi support.

`img` : | a EogImage
Returns : | the xmp data. [transfer full]

### eog_image_get_file ()

    GFile *             eog_image_get_file                  (EogImage *img);

Gets the GFile associated with `img`

`img` : | a EogImage
Returns : | a GFile. [transfer full]

### eog_image_get_uri_for_display ()

    gchar *             eog_image_get_uri_for_display       (EogImage *img);

### eog_image_get_status ()

    EogImageStatus      eog_image_get_status                (EogImage *img);

### eog_image_transform ()

    void                eog_image_transform                 (EogImage *img,
                                                             EogTransform *trans,
                                                             EogJob *job);

### eog_image_autorotate ()

    void                eog_image_autorotate                (EogImage *img);

### eog_image_get_profile ()

    cmsHPROFILE         eog_image_get_profile               (EogImage *img);

### eog_image_apply_display_profile ()

    void                eog_image_apply_display_profile     (EogImage *img,
                                                             cmsHPROFILE display_profile);

### eog_image_undo ()

    void                eog_image_undo                      (EogImage *img);

### eog_image_get_supported_mime_types ()

    GList *             eog_image_get_supported_mime_types  (void);

Gets the list of supported mimetypes

Returns : | a GList of supported mimetypes. [transfer none][element-type utf8]

### eog_image_is_supported_mime_type ()

    gboolean            eog_image_is_supported_mime_type    (const char *mime_type);

### eog_image_file_changed ()

    void                eog_image_file_changed              (EogImage *img);

Marks the image file contents as changed. Also, emits EogImage::file-changed signal.

`img` : | a EogImage

### eog_image_is_file_changed ()

    gboolean            eog_image_is_file_changed           (EogImage *img);

### eog_image_get_metadata_status ()

    EogImageMetadataStatus eog_image_get_metadata_status    (EogImage *img);

Returns the current status of the image metadata, that is, whether the metadata has not been read yet, is ready, or not available at all.

`img` : | a EogImage
Returns : | one of EogImageMetadataStatus

### eog_image_get_svg ()

    RsvgHandle *        eog_image_get_svg                   (EogImage *img);

### eog_image_get_transform ()

    EogTransform *      eog_image_get_transform             (EogImage *img);

### eog_image_is_animation ()

    gboolean            eog_image_is_animation              (EogImage *img);

Checks whether a given image is animated.

`img` : | a EogImage
Returns : | TRUE if it is an animated image, FALSE otherwise.

### eog_image_is_svg ()

    gboolean            eog_image_is_svg                    (EogImage *img);

### eog_image_start_animation ()

    gboolean            eog_image_start_animation           (EogImage *img);

Starts playing an animated image.

`img` : | a EogImage
Returns : | `TRUE` on success, `FALSE` if `img` is already playing or isn't an animated image.

## Signal Details

### The `"changed"` signal

    void                user_function                      (EogImage *eogimage,
                                                            gpointer  user_data)      : Run Last

`eogimage` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"file-changed"` signal

    void                user_function                      (EogImage *eogimage,
                                                            gpointer  user_data)      : Run Last

`eogimage` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"next-frame"` signal

    void                user_function                      (EogImage *img,
                                                            gint      delay,
                                                            gpointer  user_data)      : Run Last

The ::next-frame signal will be emitted each time an animated image advances to the next frame.

`img` : | the object which received the signal.
`delay` : | number of milliseconds the current frame will be displayed.
`user_data` : | user data set when the signal handler was connected.

### The `"save-progress"` signal

    void                user_function                      (EogImage *eogimage,
                                                            gfloat    arg1,
                                                            gpointer  user_data)      : Run Last

`eogimage` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"size-prepared"` signal

    void                user_function                      (EogImage *eogimage,
                                                            gint      arg1,
                                                            gint      arg2,
                                                            gpointer  user_data)      : Run Last

`eogimage` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"thumbnail-changed"` signal

    void                user_function                      (EogImage *eogimage,
                                                            gpointer  user_data)      : Run Last

`eogimage` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.