|
From: <the...@us...> - 2007-03-06 07:22:23
|
Revision: 18198
http://svn.sourceforge.net/gaim/?rev=18198&view=rev
Author: thekingant
Date: 2007-03-05 23:22:23 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
Don't save pngs using compression in older versions of gdk_pixbuf
which don't support it. This change is from Sean.
Modified Paths:
--------------
trunk/gtk/gtkutils.c
Modified: trunk/gtk/gtkutils.c
===================================================================
--- trunk/gtk/gtkutils.c 2007-03-03 19:25:26 UTC (rev 18197)
+++ trunk/gtk/gtkutils.c 2007-03-06 07:22:23 UTC (rev 18198)
@@ -2606,7 +2606,11 @@
for (i = 0; prpl_formats[i]; i++) {
gaim_debug_info("buddyicon", "Converting buddy icon to %s as %s\n", prpl_formats[i], filename);
- if (strcmp(prpl_formats[i], "png") == 0) {
+ /* The "compression" param wasn't supported until gdk-pixbuf 2.8.
+ * Using it in previous versions causes the save to fail (and an assert message). */
+ if ((gdk_pixbuf_major_version > 2 || (gdk_pixbuf_major_version == 2
+ && gdk_pixbuf_minor_version >= 8))
+ && strcmp(prpl_formats[i], "png") == 0) {
if (gdk_pixbuf_save(pixbuf, filename, prpl_formats[i],
&error, "compression", "9", NULL))
/* Success! */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|