protected BinaryBitmap toBitmap(LuminanceSource source) {
        if (isInverted) {
            isInverted = false;
            return new BinaryBitmap(new HybridBinarizer(source.invert()));
        } else {
            isInverted = true;
            return new BinaryBitmap(new HybridBinarizer(source));
        }
    }
Given an image source, convert to a binary bitmap.

Override this to use a custom binarizer.

@param source the image source
@return a BinaryBitmap
zxing-android-embedded/src/com/journeyapps/barcodescanner/MixedDecoder.java