shithub: jbig2

Download patch

ref: c48d802aa6f65cc0284c8aa9824b6ae4e7dd5aa1
parent: 3f91590d98fe9c341779dcfb2d13cab320073e31
author: Sebastian Rasmussen <sebras@gmail.com>
date: Fri Jun 14 18:18:14 EDT 2019

jbig2dec: Make tests expect that some test files return white image.

Previously these tests would just error out and jbig2dec would not
return any output file at all. Now, jbig2dec parses as much as
possible, while emitting warning/error messages. In the case of a
few of the test files the end result is a white image.

--- a/test_jbig2dec.py
+++ b/test_jbig2dec.py
@@ -60,6 +60,7 @@
 
   # hashes of known test inputs
   known_NOTHING_DECODED = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
+  known_WHITE_PAGE_DECODED = "28a6bd83a8a3a36910fbc1f5ce06c962e4332911"
   known_042_DECODED = "ebfdf6e2fc5ff3ee2271c2fa19de0e52712046e8"
   known_amb_DECODED = "3d4b7992d506894662b53415bd3d0d2a2f8b7953"
 
@@ -103,10 +104,10 @@
 			known_042_DECODED),
                    ('../ubc/042_13.jb2',
 			"7d428bd542f58591b254d9827f554b0552c950a7",
-			known_NOTHING_DECODED),
+			known_WHITE_PAGE_DECODED),
                    ('../ubc/042_14.jb2',
 			"c40fe3a02acb6359baf9b40fc9c49bc0800be589",
-			known_NOTHING_DECODED),
+			known_WHITE_PAGE_DECODED),
                    ('../ubc/042_15.jb2',
 			"a9e39fc1ecb178aec9f05039514d75ea3246246c",
 			known_042_DECODED),