[easytag/wip/future-gtk] Use gdk_pixbuf_loader_write_bytes()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/future-gtk] Use gdk_pixbuf_loader_write_bytes()
- Date: Fri, 9 Jan 2015 21:49:10 +0000 (UTC)
commit f112500df905132f662ec8fefc2d8f5de23f0f49
Author: David King <amigadave amigadave com>
Date: Fri Jan 9 20:33:08 2015 +0000
Use gdk_pixbuf_loader_write_bytes()
Added in GDK Pixbuf 2.30.
src/tag_area.c | 8 +-------
src/tags/ogg_tag.c | 7 +------
2 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/tag_area.c b/src/tag_area.c
index a78c370..fbff72c 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -1242,13 +1242,7 @@ PictureEntry_Update (EtTagArea *self,
if (loader)
{
- gconstpointer data;
- gsize data_size;
-
- data = g_bytes_get_data (pic->bytes, &data_size);
-
- /* TODO: Use gdk_pixbuf_loader_write_bytes(). */
- if (gdk_pixbuf_loader_write (loader, data, data_size, &error))
+ if (gdk_pixbuf_loader_write_bytes (loader, pic->bytes, &error))
{
GtkTreeSelection *selection;
GdkPixbuf *pixbuf;
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 291b7d6..f110a46 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -1004,16 +1004,11 @@ ogg_tag_write_file_tag (const ET_File *ETFile,
if (format != PICTURE_FORMAT_PNG && format != PICTURE_FORMAT_JPEG)
{
GdkPixbufLoader *loader;
- gconstpointer data;
- gsize data_size;
GError *error = NULL;
loader = gdk_pixbuf_loader_new ();
- data = g_bytes_get_data (pic->bytes, &data_size);
-
- /* TODO: Use gdk_pixbuf_loader_write_bytes() */
- if (!gdk_pixbuf_loader_write (loader, data, data_size, &error))
+ if (!gdk_pixbuf_loader_write_bytes (loader, pic->bytes, &error))
{
g_debug ("Error parsing image data: %s", error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]