Bug 691246

Summary: jbig2dec doesn't handle 042_25 (inverted symbol region)
Product: jbig2dec Reporter: Ralph Giles <ralph.giles>
Component: Missing FeatureAssignee: Alex Cherepanov <alex>
Status: RESOLVED FIXED    
Severity: normal CC: henry.stiles
Priority: P4 Keywords: bountiable
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: Patch to handle inverted symbol region

Description Ralph Giles 2010-04-16 06:03:18 UTC
jbig2dec doesn't handle the ubc testsuite file 042_25 "Symbol Region, inverted".

The program runs without error:

$ ./jbig2dec ../ubc/042_25.jb2
[no terminal output]

but the resulting image has black and white inverted.

The library should be updated to handle this case.
Comment 1 Shailesh Mistry 2013-01-23 21:51:55 UTC
Created attachment 9242 [details]
Patch to handle inverted symbol region

The error was due to the combination operator not being propagated and also because the XNOR operator was incorrectly coded.

The attached patch corrects both problems.
Comment 2 Alex Cherepanov 2013-01-27 19:12:49 UTC
Thank you for contributing to Ghostscript. Your patch has been adopted and
committed as a rev. 07d5a619b525898759a7468631a6cb775edf5bd6 .
Comment 3 Henry Stiles 2013-01-28 19:47:31 UTC
(In reply to comment #2)
> Thank you for contributing to Ghostscript. Your patch has been adopted and
> committed as a rev. 07d5a619b525898759a7468631a6cb775edf5bd6 .

Please collect the bounty.  Thanks.