projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try adding current javadoc to SVN
[zxing.git]
/
android
/
src
/
com
/
google
/
zxing
/
client
/
android
/
YUVMonochromeBitmapSource.java
diff --git
a/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java
b/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java
index
6e9295e
..
adc7648
100755
(executable)
--- a/
android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java
+++ b/
android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java
@@
-34,8
+34,6
@@
public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
private final int mDataWidth;
private final int mCropTop;
private final int mCropLeft;
private final int mDataWidth;
private final int mCropTop;
private final int mCropLeft;
- private final int mCropBottom;
- private final int mCropRight;
/**
* Builds an object around a YUV buffer from the camera. The image is not cropped.
/**
* Builds an object around a YUV buffer from the camera. The image is not cropped.
@@
-80,6
+78,7
@@
public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
int cropLeft,
int cropBottom,
int cropRight) {
int cropLeft,
int cropBottom,
int cropRight) {
+ super(cropRight - cropLeft, cropBottom - cropTop);
if (cropRight - cropLeft > dataWidth || cropBottom - cropTop > dataHeight) {
throw new IllegalArgumentException();
}
if (cropRight - cropLeft > dataWidth || cropBottom - cropTop > dataHeight) {
throw new IllegalArgumentException();
}
@@
-87,18
+86,6
@@
public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
mDataWidth = dataWidth;
this.mCropTop = cropTop;
this.mCropLeft = cropLeft;
mDataWidth = dataWidth;
this.mCropTop = cropTop;
this.mCropLeft = cropLeft;
- this.mCropBottom = cropBottom;
- this.mCropRight = cropRight;
- }
-
- @Override
- public int getHeight() {
- return mCropBottom - mCropTop;
- }
-
- @Override
- public int getWidth() {
- return mCropRight - mCropLeft;
}
/**
}
/**
@@
-110,12
+97,12
@@
public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
* @return The luminance as an int, from 0-255
*/
@Override
* @return The luminance as an int, from 0-255
*/
@Override
- p
rotected
int getLuminance(int x, int y) {
+ p
ublic
int getLuminance(int x, int y) {
return mYUVData[(y + mCropTop) * mDataWidth + x + mCropLeft] & 0xff;
}
@Override
return mYUVData[(y + mCropTop) * mDataWidth + x + mCropLeft] & 0xff;
}
@Override
- p
rotected
int[] getLuminanceRow(int y, int[] row) {
+ p
ublic
int[] getLuminanceRow(int y, int[] row) {
int width = getWidth();
if (row == null || row.length < width) {
row = new int[width];
int width = getWidth();
if (row == null || row.length < width) {
row = new int[width];
@@
-129,7
+116,7
@@
public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
}
@Override
}
@Override
- p
rotected
int[] getLuminanceColumn(int x, int[] column) {
+ p
ublic
int[] getLuminanceColumn(int x, int[] column) {
int height = getHeight();
if (column == null || column.length < height) {
column = new int[height];
int height = getHeight();
if (column == null || column.length < height) {
column = new int[height];