summaryrefslogtreecommitdiff
path: root/toolbin
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2020-05-22 11:25:43 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2020-05-22 11:27:48 -0700
commit4d3ca982177aff19331b72a226664e281feede2c (patch)
tree005c51d98a97160457ec06de22d89e5ea91f5a11 /toolbin
parente1354dbd1cfc7692b7559a3f4c7f86900e513edc (diff)
downloadghostpdl-4d3ca982177aff19331b72a226664e281feede2c.tar.gz
Fix tiff bmpcmp to organize image data upside right for windows
Diffstat (limited to 'toolbin')
-rw-r--r--toolbin/bmpcmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toolbin/bmpcmp.c b/toolbin/bmpcmp.c
index 3fed975bd..081a7581c 100644
--- a/toolbin/bmpcmp.c
+++ b/toolbin/bmpcmp.c
@@ -1149,7 +1149,7 @@ static void* tif_read(ImageReader* im,
}
data = Malloc(height * width * 4);
- row_ptr = data;
+ row_ptr = data + (height - 1) * width * 4;
buf = _TIFFmalloc(TIFFScanlineSize(tif));
if (buf == NULL) {
@@ -1183,7 +1183,7 @@ static void* tif_read(ImageReader* im,
*out++ = 0;
}
}
- row_ptr += (width * 4);
+ row_ptr -= (width * 4);
}
} else if (planar == PLANARCONFIG_SEPARATE) {
uint16 s, nsamples;
@@ -1193,7 +1193,7 @@ static void* tif_read(ImageReader* im,
for (row = 0; row < height; row++) {
TIFFReadScanline(tif, buf, row, s);
memcpy(row_ptr, buf, width * 4);
- row_ptr += (width * 4);
+ row_ptr -= (width * 4);
}
}
_TIFFfree(buf);