qzxing icon indicating copy to clipboard operation
qzxing copied to clipboard

NV21 support does not respect capturing rectangle

Open ftylitak opened this issue 5 years ago • 1 comments

The implementation of NV21 image decoding does not take into respect the capturing rectangle option even though the image_ptr provided has the size of the capturing rectangle.

current code: https://github.com/ftylitak/qzxing/blob/dbc01a383ccc14a97fe3c6dd06cc912f1c3de1d6/src/QZXingFilter.cpp#L318-L322

It seems that when calling function YUV_NV21_TO_RGB, instead of passing "width, height" arguments, we need to pass "captureRect" instance. Respectively, in YUV_NV21_TO_RGB we need to change its for loops to handle the offsets implied by the capturing rectangle.

@promag do you think you could take a look at this, since this code was merged by your PR #124 ? If not, send me an update and I will try to find some time next week.

ftylitak avatar Oct 23 '19 19:10 ftylitak

Sorry, just saw this now. I'll try to fix.

promag avatar Nov 04 '19 16:11 promag