Skip to content
  • Volker Krause's avatar
    Add a flag to abort loading PDF images when encountering colored pixels · 2d9e1de6
    Volker Krause authored
    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.
    2d9e1de6