| GOffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
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); GdkPixbuf * go_image_get_pixbuf (GOImage *image); GdkPixbuf const * go_image_get_thumbnail (GOImage *image); GOImage * go_image_new_from_file (char const *filename,GError **error); void go_image_fill (GOImage *image,GOColor color); void go_image_set_name (GOImage *image,char const *name); char const * go_image_get_name (GOImage const *image); void go_image_save (GOImage *image,GsfXMLOut *output); void go_image_load_attrs (GOImage *image,GsfXMLIn *xin,xmlChar const **attrs); void go_image_load_data (GOImage *image,GsfXMLIn *xin);
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;
typedef struct {
GOImageFormat format;
char *name;
char *desc;
char *ext;
gboolean has_pixbuf_saver;
gboolean is_dpi_useful;
gboolean alpha_support;
} GOImageFormatInfo;
GOImageFormat |
GOImageFormat. |
| image type name. | |
| image type description. | |
| file extension. | |
gboolean |
can be saved as pixbuf. |
gboolean |
depends upon device resolution. |
gboolean |
supports transparency. |
char * go_mime_to_image_format (char const *mime_type);
|
a mime type string |
Returns : |
file extension for the given mime type. |
char * go_image_format_to_mime (char const *format);
|
a file extension string |
Returns : |
corresponding mime type. |
GOImageFormatInfo const * go_image_get_format_info (GOImageFormat format);
Retrieves information associated to format.
|
a GOImageFormat |
Returns : |
a GOImageFormatInfo struct. |
GOImageFormat go_image_get_format_from_name (char const *name);
|
a string |
Returns : |
corresponding GOImageFormat. |
GSList * go_image_get_formats_with_pixbuf_saver
(void);
Returns : |
a list of GOImageFormat that can be created from a pixbuf. [element-type GOImageFormat][transfer container GOImageFormat] |
GdkPixbuf * go_image_get_pixbuf (GOImage *image);
Builds a pixbuf from the image if not already done and returns it, adding a reference.
|
GOImage |
Returns : |
the pixbuf for image. [transfer full]
|
GdkPixbuf const * go_image_get_thumbnail (GOImage *image);
Generates a thumbnail for image if not already done and returns it, adding
a reference. The pixbuf is scaled so that its width and height are not larger
than 64 pixels, and preserving the aspect ratio.
|
GOImage |
Returns : |
the thumbnail for image. [transfer full]
|
GOImage * go_image_new_from_file (char const *filename,GError **error);
|
|
|
|
Returns : |
void go_image_load_attrs (GOImage *image,GsfXMLIn *xin,xmlChar const **attrs);
|
|
|
|
|