summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-03-29 05:21:26 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-29 05:21:26 +0000
commit2aa05e973ee2709a6e3a1f5a5d538186d8c342f7 (patch)
tree502372cdbae8c92fa2e8220859677441904ee8f4 /gdk-pixbuf
parent8e5713f3e089f7d565d78502312998cb6668a21c (diff)
downloadgdk-pixbuf-2aa05e973ee2709a6e3a1f5a5d538186d8c342f7.tar.gz
Fix the update areas for incremental loading of compressed tgas. (#171883,
2005-03-29 Matthias Clasen <mclasen@redhat.com> * io-tga.c (parse_rle_data): Fix the update areas for incremental loading of compressed tgas. (#171883, David Costanzo)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/io-tga.c15
2 files changed, 11 insertions, 9 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 6ad4c7b9c..64b349384 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-29 Matthias Clasen <mclasen@redhat.com>
+
+ * io-tga.c (parse_rle_data): Fix the update areas for incremental
+ loading of compressed tgas. (#171883, David Costanzo)
+
2005-03-27 Matthias Clasen <mclasen@redhat.com>
* io-bmp.c (DoCompressed): Use the correct update regions for
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c
index 2dc753822..d28cf0903 100644
--- a/gdk-pixbuf/io-tga.c
+++ b/gdk-pixbuf/io-tga.c
@@ -23,11 +23,6 @@
/*
* Some NOTES about the TGA loader (2001/06/07, nikke@swlibero.org)
*
- * - The module doesn't currently provide support for TGA images where the
- * order of the pixels isn't left-to-right and top-to-bottom. I plan to
- * add support for those files as soon as I get one of them. I haven't
- * run into one yet. (And I don't seem to be able to create it with GIMP.)
- *
* - The TGAFooter isn't present in all TGA files. In fact, there's an older
* format specification, still in use, which doesn't cover the TGAFooter.
* Actually, most TGA files I have are of the older type. Anyway I put the
@@ -635,6 +630,7 @@ static guint parse_rle_data_grayscale(TGAContext *ctx)
static gboolean parse_rle_data(TGAContext *ctx, GError **err)
{
+ guint rows = 0;
guint count = 0;
guint pbuf_count = 0;
guint bytes_done_before = ctx->pbuf_bytes_done;
@@ -667,14 +663,15 @@ static gboolean parse_rle_data(TGAContext *ctx, GError **err)
*/
if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER))
pixbuf_flip_vertically (ctx->pbuf);
- }
+ }
+
+ rows = ctx->pbuf_bytes_done / ctx->pbuf->rowstride - bytes_done_before / ctx->pbuf->rowstride;
if (ctx->ufunc)
- (*ctx->ufunc) (ctx->pbuf, 0, ctx->pbuf_bytes_done / ctx->pbuf->rowstride,
- ctx->pbuf->width, pbuf_count / ctx->pbuf->rowstride,
+ (*ctx->ufunc) (ctx->pbuf, 0, bytes_done_before / ctx->pbuf->rowstride,
+ ctx->pbuf->width, rows,
ctx->udata);
-
return TRUE;
}