float sx =
targetWidth != 0 ? targetWidth / (float) inWidth : targetHeight / (float) inHeight;
float sy =
<BUG>targetHeight != 0 ? targetHeight / (float) inHeight : targetWidth / (float) inWidth;
matrix.preScale(sx, sy);
}</BUG>
}
if (exifRotation != 0) {
matrix.preRotate(exifRotation);
}

float sx =
targetWidth != 0 ? targetWidth / (float) inWidth : targetHeight / (float) inHeight;
float sy =
targetHeight != 0 ? targetHeight / (float) inHeight : targetWidth / (float) inWidth;
if (!onlyScaleDown || (onlyScaleDown
&& (inWidth > targetWidth || inHeight > targetHeight))) {
matrix.preScale(sx, sy);
}
}
}
if (exifRotation != 0) {
matrix.preRotate(exifRotation);
}
