I have an android app and noticed that it is onImageAvailable(ImageReader imagereader) function that takes images from the ImageReader when available and processes them. My aim is to manipulate that Image object so that it would process a png file instead of taking that image from the camera. So, I want to change
this.imagereader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {
public final void onImageAvailable(ImageReader imageReader) {
Image image = imageReader.acquireLatestImage();
}
}, this.thread1);
to something like
this.imagereader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {
public final void onImageAvailable(ImageReader imageReader) {
Image image = //png path;
}
}, this.thread1);
Is it possible?