Add a flag to abort loading PDF images when encountering colored pixels

Authored by vkrause on Oct 9 2019, 4:35 PM.

Description

Add a flag to abort loading PDF images when encountering colored pixels

This allows us to shortcut barcode decoding in quite a few cases, saving
about 30% on the entire test suite. This is a bit non-intuitive, as the
obvious checks don't work. Some vendors have anti-aliased graphics for
the barcodes rather than leaving the proper scaling to PDF, which means
we have to expect any shade between black and white as well. Some other
vendors tint the barcode in their corporate colors, so we can't assume
red == green == blue either. Therefore we check for large differences
between the color components, that seems to be almost as effective as
a strict black/white check in terms of performance, while producing no
test failures.

Details

Committed
vkrauseOct 9 2019, 4:35 PM
Parents
R1003:90c33ad7c7f6: Use PDF creation/modification dates as context date when available too
Branches
Unknown
Tags
Unknown