## go-image

go-image

## Synopsis

                        GOImage;
    enum                GOImageFormat;
                        GOImageFormatInfo;
    char *              go_mime_to_image_format             (char const *mime_type);
    char *              go_image_format_to_mime             (char const *format);
    GOImageFormatInfo const * go_image_get_format_info      (GOImageFormat format);
    GOImageFormat       go_image_get_format_from_name       (char const *name);
    GSList *            go_image_get_formats_with_pixbuf_saver
                                                            (void);
    #define             GO_TYPE_IMAGE
    #define             GO_IMAGE                            (o)
    #define             GO_IS_IMAGE                         (o)
    GType               go_image_get_type                   (void);
    cairo_t *           go_image_get_cairo                  (GOImage *image);
    cairo_pattern_t *   go_image_create_cairo_pattern       (GOImage *image);
    GOImage *           go_image_new_from_pixbuf            (GdkPixbuf *pixbuf);
    GdkPixbuf *         go_image_get_pixbuf                 (GOImage *image);
    GOImage *           go_image_new_from_file              (const char *filename,
                                                             GError **error);
    guint8 *            go_image_get_pixels                 (GOImage *image);
    int                 go_image_get_rowstride              (GOImage *image);
    void                go_image_fill                       (GOImage *image,
                                                             GOColor color);
    char const	*        go_image_get_name                   (GOImage *image);
    GdkPixbuf *         go_image_get_thumbnail              (GOImage *image);
    void                go_image_load_attrs                 (GOImage *image,
                                                             GsfXMLIn *xin,
                                                             xmlChar const **attrs);
    void                go_image_load_data                  (GOImage *image,
                                                             GsfXMLIn *xin);
    gboolean            go_image_same_pixbuf                (GOImage *first,
                                                             GOImage *second);
    void                go_image_save                       (GOImage *image,
                                                             GsfXMLOut *output);
    GtkWidget *         go_image_sel_new                    (GODoc *doc,
                                                             GOCmdContext *cc,
                                                             GOImage **image);
    void                go_image_set_name                   (GOImage *image,
                                                             char const *name);

## Object Hierarchy

      GObject
       +----GOImage

## Properties

      "height"                   guint                 : Read / Write
      "pixbuf"                   GdkPixbuf*            : Read / Write
      "width"                    guint                 : Read / Write

## Description

## Details

### GOImage

    typedef struct _GOImage GOImage;

### enum GOImageFormat

    typedef enum {
    	GO_IMAGE_FORMAT_SVG,
    	GO_IMAGE_FORMAT_PNG,
    	GO_IMAGE_FORMAT_JPG,
    	GO_IMAGE_FORMAT_PDF,
    	GO_IMAGE_FORMAT_PS,
    	GO_IMAGE_FORMAT_EMF,
    	GO_IMAGE_FORMAT_WMF,
    	GO_IMAGE_FORMAT_EPS,
    	GO_IMAGE_FORMAT_UNKNOWN
    } GOImageFormat;

### GOImageFormatInfo

    typedef struct {
    	GOImageFormat format;
    	char *name;
    	char *desc;
    	char *ext;
    	gboolean has_pixbuf_saver;
    	gboolean is_dpi_useful;
    	gboolean alpha_support;
    } GOImageFormatInfo;

### go_mime_to_image_format ()

    char *              go_mime_to_image_format             (char const *mime_type);

`mime_type` : | a mime type string
Returns : | file extension for the given mime type.

### go_image_format_to_mime ()

    char *              go_image_format_to_mime             (char const *format);

`format` : | a file extension string
Returns : | corresponding mime type.

### go_image_get_format_info ()

    GOImageFormatInfo const * go_image_get_format_info      (GOImageFormat format);

Retrieves infromation associated to `format`.

`format` : | a GOImageFormat
Returns : | a GOImageFormatInfo struct.

### go_image_get_format_from_name ()

    GOImageFormat       go_image_get_format_from_name       (char const *name);

`name` : | a string
Returns : | corresponding GOImageFormat.

### go_image_get_formats_with_pixbuf_saver ()

    GSList *            go_image_get_formats_with_pixbuf_saver
                                                            (void);

Returns : | a list of GOImageFormat that can be created from a pixbuf.

### GO_TYPE_IMAGE

    #define GO_TYPE_IMAGE (go_image_get_type ())

### GO_IMAGE()

    #define GO_IMAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_IMAGE, GOImage))

`o` : |

### GO_IS_IMAGE()

    #define GO_IS_IMAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_IMAGE))

`o` : |

### go_image_get_type ()

    GType               go_image_get_type                   (void);

Returns : |

### go_image_get_cairo ()

    cairo_t *           go_image_get_cairo                  (GOImage *image);

`image` : |
Returns : |

### go_image_create_cairo_pattern ()

    cairo_pattern_t *   go_image_create_cairo_pattern       (GOImage *image);

`image` : |
Returns : |

### go_image_new_from_pixbuf ()

    GOImage *           go_image_new_from_pixbuf            (GdkPixbuf *pixbuf);

`pixbuf` : |
Returns : |

### go_image_get_pixbuf ()

    GdkPixbuf *         go_image_get_pixbuf                 (GOImage *image);

`image` : |
Returns : |

### go_image_new_from_file ()

    GOImage *           go_image_new_from_file              (const char *filename,
                                                             GError **error);

`filename` : |
`error` : |
Returns : |

### go_image_get_pixels ()

    guint8 *            go_image_get_pixels                 (GOImage *image);

`image` : |
Returns : |

### go_image_get_rowstride ()

    int                 go_image_get_rowstride              (GOImage *image);

`image` : |
Returns : |

### go_image_fill ()

    void                go_image_fill                       (GOImage *image,
                                                             GOColor color);

`image` : |
`color` : |

### go_image_get_name ()

    char const	*        go_image_get_name                   (GOImage *image);

`image` : |
Returns : |

### go_image_get_thumbnail ()

    GdkPixbuf *         go_image_get_thumbnail              (GOImage *image);

`image` : |
Returns : |

### go_image_load_attrs ()

    void                go_image_load_attrs                 (GOImage *image,
                                                             GsfXMLIn *xin,
                                                             xmlChar const **attrs);

`image` : |
`xin` : |
`attrs` : |

### go_image_load_data ()

    void                go_image_load_data                  (GOImage *image,
                                                             GsfXMLIn *xin);

`image` : |
`xin` : |

### go_image_same_pixbuf ()

    gboolean            go_image_same_pixbuf                (GOImage *first,
                                                             GOImage *second);

`first` : |
`second` : |
Returns : |

### go_image_save ()

    void                go_image_save                       (GOImage *image,
                                                             GsfXMLOut *output);

`image` : |
`output` : |

### go_image_sel_new ()

    GtkWidget *         go_image_sel_new                    (GODoc *doc,
                                                             GOCmdContext *cc,
                                                             GOImage **image);

`doc` : | The GODoc owning the image collection
`cc` : |
`image` : | GOImage
Returns : | and shows new image selector.

### go_image_set_name ()

    void                go_image_set_name                   (GOImage *image,
                                                             char const *name);

`image` : |
`name` : |

## Property Details

### The `"height"` property

      "height"                   guint                 : Read / Write

Image height in pixels.

Allowed values: <= 65535

Default value: 0

### The `"pixbuf"` property

      "pixbuf"                   GdkPixbuf*            : Read / Write

GdkPixbuf object from which the GOImage is built.

### The `"width"` property

      "width"                    guint                 : Read / Write

Image width in pixels.

Allowed values: <= 65535

Default value: 0