gtk+ r21497 - trunk/gdk-pixbuf
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21497 - trunk/gdk-pixbuf
- Date: Tue, 23 Sep 2008 11:30:36 +0000 (UTC)
Author: timj
Date: Tue Sep 23 11:30:35 2008
New Revision: 21497
URL: http://svn.gnome.org/viewvc/gtk+?rev=21497&view=rev
Log:
2008-09-23 13:28:23 Tim Janik <timj imendio com>
* gdk-pixdata.c: prevent RLE encoding of 1x1 pixel images, since the
encoder comparison operator requires at least 2 pixels, fixes #553374:
Bug 553374 - gdk_pixdata_from_pixbuf fails for some images with use_rle set to TRUE
Modified:
trunk/gdk-pixbuf/ChangeLog
trunk/gdk-pixbuf/gdk-pixdata.c
Modified: trunk/gdk-pixbuf/gdk-pixdata.c
==============================================================================
--- trunk/gdk-pixbuf/gdk-pixdata.c (original)
+++ trunk/gdk-pixbuf/gdk-pixdata.c Tue Sep 23 11:30:35 2008
@@ -328,8 +328,8 @@
height = pixbuf->height;
rowstride = pixbuf->rowstride;
- encoding = use_rle ? GDK_PIXDATA_ENCODING_RLE : GDK_PIXDATA_ENCODING_RAW;
bpp = pixbuf->has_alpha ? 4 : 3;
+ encoding = use_rle && ((rowstride / bpp | height) > 1) ? GDK_PIXDATA_ENCODING_RLE : GDK_PIXDATA_ENCODING_RAW;
if (encoding == GDK_PIXDATA_ENCODING_RLE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]