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

* commit '1a6e17e80ae4e27b2135259aeca29e889f12872d':
  ImageReader: get correct crop size
This commit is contained in:
Zhijun He
2013-09-16 10:41:30 -07:00
committed by Android Git Automerger

View File

@@ -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();