[gimp] Fix rle encoding, first byte of run was added to previous non-run.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Fix rle encoding, first byte of run was added to previous non-run.
- Date: Sat, 25 Mar 2017 02:59:10 +0000 (UTC)
commit c3dc3ea59f25de57703390123a14039fb7a2c0eb
Author: HJ Imbens <hj imbens nl>
Date: Wed Nov 25 09:35:57 2015 +0100
Fix rle encoding, first byte of run was added to previous non-run.
app/xcf/xcf-save.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index fd981c0..eeee9e9 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -1654,6 +1654,13 @@ xcf_save_tile_rle (XcfInfo *info,
{
const guchar *t;
+ /* if we came here because of a new run, backup one */
+ if (!((length == 32768) || ((size - length) == 0)))
+ {
+ length--;
+ data -= bpp;
+ }
+
count += length;
state = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]