summaryrefslogtreecommitdiff
path: root/gtk/gtkselection.c
diff options
context:
space:
mode:
authorSven Neumann <sven@gimp.org>2005-05-26 16:20:08 +0000
committerSven Neumann <neo@src.gnome.org>2005-05-26 16:20:08 +0000
commitbc6c9745d851ca6542224371735b0eb7c106c273 (patch)
tree5f4eba029c189486c2b9889c731be94b16a313fd /gtk/gtkselection.c
parentbea236b9c1a1179f40e8f77c372f5f888ac942be (diff)
downloadgtk+-bc6c9745d851ca6542224371735b0eb7c106c273.tar.gz
use a less aggressive PNG compression level (bug #305340).
2005-05-26 Sven Neumann <sven@gimp.org> * gtk/gtkselection.c (gtk_selection_data_set_pixbuf): use a less aggressive PNG compression level (bug #305340).
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r--gtk/gtkselection.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 1c04c3f241..241a8ff5ff 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -1361,17 +1361,20 @@ gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data,
if (selection_data->target == atom)
{
str = NULL;
- type = gdk_pixbuf_format_get_name (fmt),
+ type = gdk_pixbuf_format_get_name (fmt);
result = gdk_pixbuf_save_to_buffer (pixbuf, &str, &len,
- type, NULL, NULL);
- if (result)
+ type, NULL,
+ ((strcmp (type, "png") == 0) ?
+ "compression" : NULL), "2",
+ NULL);
+ if (result)
gtk_selection_data_set (selection_data,
atom, 8, (guchar *)str, len);
g_free (type);
g_free (str);
g_strfreev (mimes);
g_slist_free (formats);
-
+
return result;
}
}