glassechidna / zxing-cpp

ZXing C++ Library
Apache License 2.0
598 stars 435 forks source link

Implement GreyscaleLuminanceSource::crop() #30

Closed chakrit closed 7 years ago

chakrit commented 8 years ago

I tested this lib with a large image using GenericMultipleBarcodeReader and GreyscaleLuminanceSource and it throws IllegalArgumentException("This luminance source does not support cropping.").

I read the code and it seems the class already does what looks like cropping in its constructor so I just use it to implement crop() and now the code works correctly, thus the PR.

Let me know if this isn't the right fix.

aidansteele commented 7 years ago

Going to close and reopen to trigger a Travis CI build