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

Commit cfa55336 authored by Zhijun He's avatar Zhijun He
Browse files

ImageReader: get correct crop size

Bug: 10752797
Change-Id: I2e56d69cde7f5ca669a366646b876861b277a239
parent 750ce3ac
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -739,11 +739,9 @@ static jboolean ImageReader_imageSetup(JNIEnv* env, jobject thiz,
    int outputHeight = buffer->height;
    int outputHeight = buffer->height;


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


    int imageReaderWidth = ctx->getBufferWidth();
    int imageReaderWidth = ctx->getBufferWidth();