Fixed
Status Update
Comments
er...@google.com <er...@google.com>
ni...@google.com <ni...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b2702e74aa9d80f85b73f7cb418e4077be5ab0cf
Author: Franklin Wu <nilknarfuw@google.com>
Date: Wed Apr 08 13:35:53 2020
Fix bug where Image data not rewound
In ImageCapture the ImageProxy's buffer is used to retrieve the exif
orientation, however the buffer was not rewound. This change fixes it so
that buffer is rewound.
Also added test in ImageCaptureTest which accesses the buffer so that it
verifies the buffer has been rewound.
Relnote: "Fix bug where buffer in ImageProxy from ImageCapture was not
rewound"
Bug: b/153249512
Test: androidx.camera.camera2.ImageCaptureTest
Change-Id: I0c45524cdf5cc44e2b0441e82c4cc467d1e611e3
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/ImageCaptureTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
https://android-review.googlesource.com/1282593
Branch: androidx-master-dev
commit b2702e74aa9d80f85b73f7cb418e4077be5ab0cf
Author: Franklin Wu <nilknarfuw@google.com>
Date: Wed Apr 08 13:35:53 2020
Fix bug where Image data not rewound
In ImageCapture the ImageProxy's buffer is used to retrieve the exif
orientation, however the buffer was not rewound. This change fixes it so
that buffer is rewound.
Also added test in ImageCaptureTest which accesses the buffer so that it
verifies the buffer has been rewound.
Relnote: "Fix bug where buffer in ImageProxy from ImageCapture was not
rewound"
Bug:
Test: androidx.camera.camera2.ImageCaptureTest
Change-Id: I0c45524cdf5cc44e2b0441e82c4cc467d1e611e3
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/ImageCaptureTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
er...@google.com <er...@google.com>
ni...@google.com <ni...@google.com> #3
Fix will be available as of core beta04
Description
androidx.camera:camera-view:1.0.0-alpha09
androidx.camera:camera-camera2:1.0.0-beta02
ANDROID OS BUILD NUMBER: QQ2A.200305.002
DEVICE NAME: Pixel 3
LIST ANY EXPERIMENTAL FEATURES: ExperimentalGetImage
REPRODUCIBILITY: 100%
CODE FRAGMENTS:
cameraView.takePicture(cameraExecutor, new ImageCapture.OnImageCapturedCallback() {
@Override
@ExperimentalGetImage
public void onCaptureSuccess(@NonNull ImageProxy imageProxy) {
Image image = imageProxy.getImage();
// THIS IS THE MAGIC LINE: without that you cant use <image>
image.getPlanes()[0].getBuffer().rewind(); // <----------
// now i can use image buffer
super.onCaptureSuccess(imageProxy);
}
});
buffer is already used ? is strange that i need to rewind buffer before usage, i lost 4 hours before understand it