|
|
@ -176,6 +176,8 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
public void onSurfaceTextureAvailable(SurfaceTexture texture, int width, int height) {
|
|
|
|
public void onSurfaceTextureAvailable(SurfaceTexture texture, int width, int height) {
|
|
|
|
configureTransform(width, height);
|
|
|
|
configureTransform(width, height);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MicroPhotoService.infoLog("RawActivity onSurfaceTextureAvailable PHOTOID=" + Long.toString(mPhotoId));
|
|
|
|
|
|
|
|
|
|
|
|
if (!mTaken) {
|
|
|
|
if (!mTaken) {
|
|
|
|
mTaken = true;
|
|
|
|
mTaken = true;
|
|
|
|
|
|
|
|
|
|
|
@ -192,6 +194,8 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
public void onSurfaceTextureSizeChanged(SurfaceTexture texture, int width, int height) {
|
|
|
|
public void onSurfaceTextureSizeChanged(SurfaceTexture texture, int width, int height) {
|
|
|
|
configureTransform(width, height);
|
|
|
|
configureTransform(width, height);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MicroPhotoService.infoLog("RawActivity onSurfaceTextureSizeChanged PHOTOID=" + Long.toString(mPhotoId));
|
|
|
|
|
|
|
|
|
|
|
|
if (!mTaken) {
|
|
|
|
if (!mTaken) {
|
|
|
|
mTaken = true;
|
|
|
|
mTaken = true;
|
|
|
|
|
|
|
|
|
|
|
@ -262,8 +266,6 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
|
|
|
|
|
|
|
|
private int mOrientation = -1;
|
|
|
|
private int mOrientation = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A {@link CameraCaptureSession } for camera preview.
|
|
|
|
* A {@link CameraCaptureSession } for camera preview.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -389,7 +391,6 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
broadcastPhotoFile(false, "");
|
|
|
|
broadcastPhotoFile(false, "");
|
|
|
|
finish();
|
|
|
|
finish();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -643,6 +644,9 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
// configure the preview bounds here (otherwise, we wait until the surface is ready in
|
|
|
|
// configure the preview bounds here (otherwise, we wait until the surface is ready in
|
|
|
|
// the SurfaceTextureListener).
|
|
|
|
// the SurfaceTextureListener).
|
|
|
|
if (mTextureView.isAvailable()) {
|
|
|
|
if (mTextureView.isAvailable()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MicroPhotoService.infoLog("RawActivity mTextureView is Available PHOTOID=" + Long.toString(mPhotoId));
|
|
|
|
|
|
|
|
|
|
|
|
configureTransform(mTextureView.getWidth(), mTextureView.getHeight());
|
|
|
|
configureTransform(mTextureView.getWidth(), mTextureView.getHeight());
|
|
|
|
|
|
|
|
|
|
|
|
mMessageHandler.postDelayed(new Runnable() {
|
|
|
|
mMessageHandler.postDelayed(new Runnable() {
|
|
|
@ -1354,10 +1358,9 @@ public class RawActivity extends AppCompatActivity {
|
|
|
|
DngCreator dngCreator = new DngCreator(mCharacteristics, mCaptureResult);
|
|
|
|
DngCreator dngCreator = new DngCreator(mCharacteristics, mCaptureResult);
|
|
|
|
FileOutputStream output = null;
|
|
|
|
FileOutputStream output = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
MicroPhotoService.infoLog("RawActivity Image Size=" + Integer.toString(mImage.getWidth()) + "," + Integer.toString(mImage.getHeight()));
|
|
|
|
output = new FileOutputStream(mFile);
|
|
|
|
output = new FileOutputStream(mFile);
|
|
|
|
dngCreator.writeImage(output, mImage);
|
|
|
|
dngCreator.writeImage(output, mImage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mResult = true;
|
|
|
|
mResult = true;
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|