mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
prevent RLE encoding of 1x1 pixel images, since the encoder comparison
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 svn path=/trunk/; revision=21497
This commit is contained in:
parent
014acf7565
commit
69be45d1d4
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
||||
2008-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-io.c: Don't call fill_info if we've already filled
|
||||
|
@ -328,8 +328,8 @@ gdk_pixdata_from_pixbuf (GdkPixdata *pixdata,
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user