[goffice] Fix pixbuf saving.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix pixbuf saving.
- Date: Wed, 6 May 2015 17:47:07 +0000 (UTC)
commit da0411475ce7b28168bd5792403c04a83f4e76b4
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed May 6 19:46:43 2015 +0200
Fix pixbuf saving.
ChangeLog | 5 +++++
goffice/utils/go-image.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 845bc5b..a9b81b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-06 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/utils/go-image.c (go_image_save): save original pixbuf data.
+ [see #748493, comments 13 and 14]
+
2015-05-04 Morten Welinder <terra gnome org>
* goffice/graph/gog-axis.c (axis_format_value): Allow caller to
diff --git a/goffice/utils/go-image.c b/goffice/utils/go-image.c
index d79eea8..7a9cb2e 100644
--- a/goffice/utils/go-image.c
+++ b/goffice/utils/go-image.c
@@ -770,7 +770,10 @@ go_image_save (GOImage *image, GsfXMLOut *output)
gsf_xml_out_add_cstr (output, "type", G_OBJECT_TYPE_NAME (image));
gsf_xml_out_add_int (output, "width", image->width);
gsf_xml_out_add_int (output, "height", image->height);
- ((GOImageClass *) G_OBJECT_GET_CLASS (image))->save (image, output);
+ if (image->data != NULL && image->data_length > 0)
+ gsf_xml_out_add_base64 (output, NULL, image->data, image->data_length);
+ else /* should this still happen? */
+ ((GOImageClass *) G_OBJECT_GET_CLASS (image))->save (image, output);
gsf_xml_out_end_element (output);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]