mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
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:
parent
c3e5f1fcfd
commit
cca4b72bfa
|
@ -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.
|
// up front, which is the same as the Y channel of the YUVLuminanceSource in the real app.
|
||||||
luminances = new byte[width * height];
|
luminances = new byte[width * height];
|
||||||
for (int y = 0; y < height; y++) {
|
for (int y = 0; y < height; y++) {
|
||||||
int offset = y * height;
|
int offset = y * width;
|
||||||
for (int x = 0; x < width; x++) {
|
for (int x = 0; x < width; x++) {
|
||||||
int pixel = pixels[offset + x];
|
int pixel = pixels[offset + x];
|
||||||
int r = (pixel >> 16) & 0xff;
|
int r = (pixel >> 16) & 0xff;
|
||||||
|
|
Loading…
Reference in a new issue