[easytag/wip/future-gtk: 65/67] Use gdk_pixbuf_loader_write_bytes()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/future-gtk: 65/67] Use gdk_pixbuf_loader_write_bytes()
- Date: Sat, 21 Mar 2015 20:02:53 +0000 (UTC)
commit fc2dc8c5907bbe1edc10101e1fea5ed33d6f479f
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 | 9 ++-------
2 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/src/tag_area.c b/src/tag_area.c
index e97d028..7801684 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -1270,13 +1270,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 e143852..7e2f6c9 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -1015,17 +1015,12 @@ ogg_tag_write_file_tag (const ET_File *ETFile,
if (format != PICTURE_FORMAT_PNG && format != PICTURE_FORMAT_JPEG)
{
GdkPixbufLoader *loader;
- gconstpointer old_data;
- gsize old_data_size;
GError *loader_error = NULL;
loader = gdk_pixbuf_loader_new ();
- old_data = g_bytes_get_data (pic->bytes, &old_data_size);
-
- /* TODO: Use gdk_pixbuf_loader_write_bytes() */
- if (!gdk_pixbuf_loader_write (loader, old_data, old_data_size,
- &loader_error))
+ if (!gdk_pixbuf_loader_write_bytes (loader, pic->bytes,
+ &loader_error))
{
g_debug ("Error parsing image data: %s",
loader_error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]