shithub: jbig2

Download patch

ref: 77ff23aa10115588a03dc689a75c8a0bd20ae526
parent: 43bece48d92766da751635b9faa7e5f01b846e44
author: Sebastian Rasmussen <sebras@gmail.com>
date: Sun Jul 8 21:30:11 EDT 2018

jbig2dec: Stripe offsets are absolute, not relative.

--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -267,7 +267,7 @@
 
     /* grow the page to accommodate a new stripe if necessary */
     if (page->striped && page->height == 0xFFFFFFFF) {
-        uint32_t new_height = y + image->height + page->end_row;
+        uint32_t new_height = y + image->height;
 
         if (page->image->height < new_height) {
             Jbig2Image *resized_image = NULL;
@@ -281,7 +281,7 @@
         }
     }
 
-    code = jbig2_image_compose(ctx, page->image, image, x, y + page->end_row, op);
+    code = jbig2_image_compose(ctx, page->image, image, x, y, op);
     if (code < 0)
         return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "failed to compose image with page");