Skip to content

Commit 5e3ae33

Browse files
author
Hao Tran
committed
...
1 parent 10253ab commit 5e3ae33

File tree

3 files changed

+15
-20
lines changed

3 files changed

+15
-20
lines changed

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

app/src/main/java/com/haotran/testing/MainActivity.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,18 @@ protected void onCreate(Bundle savedInstanceState) {
2525

2626
// startScan();
2727
startCapture();
28-
findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
29-
@Override
30-
public void onClick(View view) {
31-
// startScan();
32-
// startCapture();
33-
}
34-
});
28+
// findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
29+
// @Override
30+
// public void onClick(View view) {
31+
//// startScan();
32+
//// startCapture();
33+
// }
34+
// });
3535
}
3636

3737
private void startCapture() {
3838
Intent intent = new Intent(this, CaptureActivity.class);
3939
startActivityForResult(intent, REQUEST_CODE);
40-
41-
4240
}
4341

4442
// private void startScan() {

documentscanner/src/main/java/com/haotran/documentscanner/view/ScanSurfaceView.java

+8-11
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ public void onPreviewFrame(byte[] data, Camera camera) {
262262
try {
263263

264264
Camera.Size pictureSize = camera.getParameters().getPreviewSize();
265-
int width = pictureSize.width;
266-
int height = pictureSize.height;
265+
// int width = pictureSize.width;
266+
// int height = pictureSize.height;
267267

268268
Log.d(TAG, "onPreviewFrame - received image " + pictureSize.width + "x" + pictureSize.height);
269269
Mat yuv = new Mat(new Size(pictureSize.width, pictureSize.height * 1.5), CV_8UC1);
@@ -285,9 +285,6 @@ public void onPreviewFrame(byte[] data, Camera camera) {
285285

286286
yuv.release();
287287

288-
289-
290-
291288
// YuvImage yuv = new YuvImage(data,camera.getParameters().getPreviewFormat(), width, height, null);
292289
// ByteArrayOutputStream out = new ByteArrayOutputStream();
293290
// yuv.compressToJpeg(new Rect(0, 0, width, height), 100, out);
@@ -568,12 +565,12 @@ public void onPictureTaken(byte[] data, Camera camera) {
568565
bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
569566

570567
iScanner.onPictureClicked(bitmap);
571-
postDelayed(new Runnable() {
572-
@Override
573-
public void run() {
574-
isCapturing = false;
575-
}
576-
}, 1000);
568+
// postDelayed(new Runnable() {
569+
// @Override
570+
// public void run() {
571+
// isCapturing = false;
572+
// }
573+
// }, 1000);
577574

578575
AlertDialog.Builder builder = new AlertDialog.Builder(context)
579576
.setTitle("Add next page")

0 commit comments

Comments
 (0)