Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f4fcfe4 authored by Zhijun He's avatar Zhijun He Committed by Android Git Automerger
Browse files

am 1a6e17e8: am 869f44cc: Merge "ImageReader: get correct crop size" into klp-dev

* commit '1a6e17e8':
  ImageReader: get correct crop size
parents 0754cb75 1a6e17e8
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -739,11 +739,9 @@ static jboolean ImageReader_imageSetup(JNIEnv* env, jobject thiz,
    int outputHeight = buffer->height;

    // Correct width/height when crop is set.
    if (buffer->crop.getWidth() > 0) {
        outputWidth = buffer->crop.getWidth() + 1;
    }
    if (buffer->crop.getHeight() > 0) {
        outputHeight = buffer->crop.getHeight() + 1;
    if (buffer->crop.isValid()) {
        outputWidth = buffer->crop.getWidth();
        outputHeight = buffer->crop.getHeight();
    }

    int imageReaderWidth = ctx->getBufferWidth();