Issue 1333 fix off by one when not cropped

git-svn-id: https://zxing.googlecode.com/svn/trunk@2390 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-08-14 21:23:09 +00:00
parent 4aa2358e31
commit ea08f0348c

View file

@ -45,7 +45,7 @@ unsigned char* GreyscaleRotatedLuminanceSource::getRow(int y, unsigned char* row
if (row == NULL) {
row = new unsigned char[width];
}
int offset = (left_ * dataWidth_) + (dataWidth_ - (y + top_));
int offset = (left_ * dataWidth_) + (dataWidth_ - 1 - (y + top_));
for (int x = 0; x < width; x++) {
row[x] = greyData_[offset];
offset += dataWidth_;