Whoops, fixed long-standing bug in the benchmark. Never noticed before because we always used square images.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1001 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-06-26 21:18:58 +00:00
parent c3e5f1fcfd
commit cca4b72bfa

View file

@ -49,7 +49,7 @@ public final class RGBLuminanceSource extends LuminanceSource {
// up front, which is the same as the Y channel of the YUVLuminanceSource in the real app.
luminances = new byte[width * height];
for (int y = 0; y < height; y++) {
int offset = y * height;
int offset = y * width;
for (int x = 0; x < width; x++) {
int pixel = pixels[offset + x];
int r = (pixel >> 16) & 0xff;