aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <poincare@ikezoe.net>2007-07-31 18:54:05 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-31 18:54:05 +0800
commit012717872dccd61dd638d5ce68f8ab7c64b52d7b (patch)
tree2b99c3b4c6d8dd9b6b973c8f5f73b5eec5e5b497 /addressbook/gui
parent49caaeeafa83f7f16f09784c9569193744ed5790 (diff)
downloadgsoc2013-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
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c8
1 files changed, 7 insertions, 1 deletions
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);
}
}