diff options
author | Hiroyuki Ikezoe <poincare@ikezoe.net> | 2007-07-31 18:54:05 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-07-31 18:54:05 +0800 |
commit | 012717872dccd61dd638d5ce68f8ab7c64b52d7b (patch) | |
tree | 2b99c3b4c6d8dd9b6b973c8f5f73b5eec5e5b497 | |
parent | 49caaeeafa83f7f16f09784c9569193744ed5790 (diff) | |
download | gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar.gz gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar.bz2 gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar.lz gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar.xz gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.tar.zst gsoc2013-evolution-012717872dccd61dd638d5ce68f8ab7c64b52d7b.zip |
** Fix for bug #462002
2007-07-31 Hiroyuki Ikezoe <poincare@ikezoe.net>
** Fix for bug #462002
* gui/contact-editor/e-contact-editor.c: (extract_simple_field): Save
resizing image as its original format.
svn path=/trunk/; revision=33914
-rw-r--r-- | addressbook/ChangeLog | 7 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 96a7411b77..0cc69dd169 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2007-07-31 Hiroyuki Ikezoe <poincare@ikezoe.net> + + ** Fix for bug #462002 + + * gui/contact-editor/e-contact-editor.c: (extract_simple_field): Save + resizing image as its original format. + 2007-07-27 Hiroyuki Ikezoe <poincare@ikezoe.net> * gui/widgets/e-minicard.c: (add_email_field): Use g_strdup() instead diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 6d9d2dffe4..2c94e0cbd1 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2257,6 +2257,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) else if (E_IS_IMAGE_CHOOSER (widget)) { EContactPhoto photo; photo.type = E_CONTACT_PHOTO_TYPE_INLINED; + photo.data.inlined.mime_type = NULL; if (editor->image_changed) { if (editor->image_set && @@ -2291,8 +2292,13 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) new = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR); if (new) { + GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader); + gchar *format_name = gdk_pixbuf_format_get_name (format); g_free(photo.data.inlined.data); - gdk_pixbuf_save_to_buffer (new, (gchar **)&photo.data.inlined.data, &photo.data.inlined.length, "jpeg", NULL, "quality", "100", NULL); + gdk_pixbuf_save_to_buffer (new, (gchar **)&(photo.data.inlined.data), + &photo.data.inlined.length, + format_name, NULL, NULL); + g_free (format_name); g_object_unref (new); } } |