#include <glib-object.h>
#include <gdk/gdk.h>
Go to the source code of this file.
#define EV_IS_IMAGE |
( |
|
object) | |
(G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_IMAGE)) |
#define EV_IS_IMAGE_CLASS |
( |
|
klass) | |
(G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_IMAGE)) |
gint ev_image_get_id |
( |
EvImage * |
image) | |
|
Definition at line 117 of file ev-image.c.
121 return image->priv->id;
gint ev_image_get_page |
( |
EvImage * |
image) | |
|
Definition at line 109 of file ev-image.c.
113 return image->priv->page;
GdkPixbuf* ev_image_get_pixbuf |
( |
EvImage * |
image) | |
|
ev_image_get_pixbuf: an EvImage
Returns: (transfer none): a #GdkPixbuf
Definition at line 131 of file ev-image.c.
134 g_return_val_if_fail (GDK_IS_PIXBUF (image->priv->pixbuf), NULL);
136 return image->priv->pixbuf;
const gchar* ev_image_get_tmp_uri |
( |
EvImage * |
image) | |
|
Definition at line 182 of file ev-image.c.
186 return image->priv->tmp_uri;
GType ev_image_get_type |
( |
void |
) | |
|
EvImage* ev_image_new |
( |
gint |
page, |
|
|
gint |
img_id |
|
) |
| |
Definition at line 83 of file ev-image.c.
89 image->priv->page = page;
90 image->priv->id = img_id;
EvImage* ev_image_new_from_pixbuf |
( |
GdkPixbuf * |
pixbuf) | |
|
Definition at line 96 of file ev-image.c.
100 g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
103 image->priv->pixbuf = g_object_ref (pixbuf);
const gchar* ev_image_save_tmp |
( |
EvImage * |
image, |
|
|
GdkPixbuf * |
pixbuf |
|
) |
| |
Definition at line 140 of file ev-image.c.
143 GError *error = NULL;
144 gchar *filename = NULL;
148 g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
150 if (image->priv->tmp_uri)
151 return image->priv->tmp_uri;
153 if ((fd =
ev_mkstemp (
"image.XXXXXX.png", &filename, &error)) == -1)
156 gdk_pixbuf_save (pixbuf, filename,
158 "compression",
"3", NULL);
162 image->priv->tmp_uri = g_filename_to_uri (filename, NULL, &error);
163 if (image->priv->tmp_uri == NULL)
168 return image->priv->tmp_uri;
174 g_warning (
"Error saving image: %s", error->message);
175 g_error_free (error);