You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Rotate and/or flip the image to match the given exif orientation. * * @param toOrient The bitmap to rotate/flip. * @param pool A pool that may or may not contain an image of the necessary dimensions. * @param exifOrientation the exif orientation [1-8]. * @return The rotated and/or flipped image or toOrient if no rotation or flip was necessary. */publicstaticBitmaprotateImageExif(BitmaptoOrient, BitmapPoolpool, intexifOrientation) {
if (exifOrientation == ExifInterface.ORIENTATION_NORMAL
|| exifOrientation == ExifInterface.ORIENTATION_UNDEFINED) {
returntoOrient;
}
@param exifOrientation the exif orientation [1-8]. But the value of exifOrientation may be -1,because of new ImageHeaderParser( stream ).getOrientation()may be -1.
When the value is -1, the condition is no effect.
if (exifOrientation == ExifInterface.ORIENTATION_NORMAL
|| exifOrientation == ExifInterface.ORIENTATION_UNDEFINED) {
The text was updated successfully, but these errors were encountered:
I imagine the reason you closed this is that initializeMatrixForRotation doesn't set a rotation for unrecognized values, so the end result is a Bitmap that is not yet rotated?
It's a reasonable point though that we should still be more efficient about doing nothing for orientations we generate. I think this is a legit report from an efficiency perspective if not correctness, thanks for filing the issue!
@param exifOrientation the exif orientation [1-8].
But the value of exifOrientation may be -1,because ofnew ImageHeaderParser( stream ).getOrientation()
may be -1.When the value is -1, the condition is no effect.
The text was updated successfully, but these errors were encountered: