Skip to content
Commit 2d9e1de6 authored by Volker Krause's avatar Volker Krause
Browse files

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.
parent 90c33ad7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment