cpw.malu.ft_thumbnails: a5035298: Use PNG instead of JPEG for FT thumbnail...

qulogic at pidgin.im qulogic at pidgin.im
Sun Feb 28 00:53:05 EST 2010


-----------------------------------------------------------------
Revision: a50352985ad85adc1c694b2d79d61a5a61c00de5
Ancestor: 8e2b7f928b977c3a3e7555d39108bc3a47911f38
Author: qulogic at pidgin.im
Date: 2010-02-28T05:35:20
Branch: im.pidgin.cpw.malu.ft_thumbnails
URL: http://d.pidgin.im/viewmtn/revision/info/a50352985ad85adc1c694b2d79d61a5a61c00de5

Modified files:
        libpurple/protocols/jabber/si.c pidgin/gtkft.c

ChangeLog: 

Use PNG instead of JPEG for FT thumbnails which is supported on both MSN
and XMPP. Maybe we should add a hint for the UI similar to buddy icons.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/si.c	b324c22ffdb4cf566cc57ec0746d04a993d841b0
+++ libpurple/protocols/jabber/si.c	a9a33032eeac3ca9eacd21f88f13cde362708980
@@ -1269,13 +1269,13 @@ static void jabber_si_xfer_send_request(
 	if (purple_xfer_get_thumbnail_data(xfer)) {
 		JabberData *thumbnail_data = 
 			jabber_data_create_from_data(purple_xfer_get_thumbnail_data(xfer),
-				purple_xfer_get_thumbnail_size(xfer), "image/jpeg", TRUE,
+				purple_xfer_get_thumbnail_size(xfer), "image/png", TRUE,
 				jsx->js);
 		xmlnode *thumbnail = xmlnode_new_child(file, "thumbnail");
 		xmlnode_set_namespace(thumbnail, NS_THUMBS);
 		xmlnode_set_attrib(thumbnail, "cid", 
 			jabber_data_get_cid(thumbnail_data));
-		xmlnode_set_attrib(thumbnail, "mime-type", "image/jpeg");
+		xmlnode_set_attrib(thumbnail, "mime-type", "image/png");
 		/* cache data */
 		jabber_data_associate_local(thumbnail_data, NULL);
 	}
============================================================
--- pidgin/gtkft.c	0cbd488434f6f24d7bc2a06b6a537b2f1aa38cfc
+++ pidgin/gtkft.c	f82782f3949607d87afd08862c161faf5dbe8969
@@ -1175,7 +1175,7 @@ pidgin_xfer_add_thumbnail(PurpleXfer *xf
 			gsize size;
 			char *option_keys[2] = {"quality", NULL};
 			char *option_values[2] = {"75", NULL};
-			gdk_pixbuf_save_to_bufferv(thumbnail, &buffer, &size, "jpeg", 
+			gdk_pixbuf_save_to_bufferv(thumbnail, &buffer, &size, "png", 
 				option_keys, option_values, NULL);
 
 			if (buffer) {


More information about the Commits mailing list