Java Code Examples for android.support.media.ExifInterface#ORIENTATION_FLIP_VERTICAL
The following examples show how to use
android.support.media.ExifInterface#ORIENTATION_FLIP_VERTICAL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PostProcessor.java From camerakit-android with MIT License | 6 votes |
public boolean areDimensionsFlipped() { switch (orientation) { case ExifInterface.ORIENTATION_TRANSPOSE: case ExifInterface.ORIENTATION_ROTATE_90: case ExifInterface.ORIENTATION_TRANSVERSE: case ExifInterface.ORIENTATION_ROTATE_270: return true; case ExifInterface.ORIENTATION_FLIP_HORIZONTAL: case ExifInterface.ORIENTATION_ROTATE_180: case ExifInterface.ORIENTATION_FLIP_VERTICAL: case ExifInterface.ORIENTATION_NORMAL: case ExifInterface.ORIENTATION_UNDEFINED: return false; } return false; }
Example 2
Source File: PostProcessor.java From camerakit-android with MIT License | 5 votes |
public void apply(JpegTransformer transformer) { switch (orientation) { case ExifInterface.ORIENTATION_FLIP_HORIZONTAL: transformer.flipHorizontal(); break; case ExifInterface.ORIENTATION_ROTATE_180: transformer.rotate(180); break; case ExifInterface.ORIENTATION_FLIP_VERTICAL: transformer.flipVertical(); break; case ExifInterface.ORIENTATION_TRANSPOSE: transformer.rotate(90); transformer.flipHorizontal(); break; case ExifInterface.ORIENTATION_ROTATE_90: transformer.rotate(90); break; case ExifInterface.ORIENTATION_TRANSVERSE: transformer.rotate(270); transformer.flipHorizontal(); break; case ExifInterface.ORIENTATION_ROTATE_270: transformer.rotate(90); break; case ExifInterface.ORIENTATION_NORMAL: case ExifInterface.ORIENTATION_UNDEFINED: break; } }
Example 3
Source File: LoadedImage.java From edslite with GNU General Public License v2.0 | 4 votes |
private void loadInitOrientation(Path imagePath) { try { InputStream s = imagePath.getFile().getInputStream(); try { Metadata m = ImageMetadataReader.readMetadata(s); for(Directory directory: m.getDirectories()) if(directory.containsTag(ExifSubIFDDirectory.TAG_ORIENTATION)) { int orientation = directory.getInt(ExifSubIFDDirectory.TAG_ORIENTATION); switch (orientation) { case ExifInterface.ORIENTATION_FLIP_HORIZONTAL: _flipX = true; break; case ExifInterface.ORIENTATION_ROTATE_180: _rotation = 180; break; case ExifInterface.ORIENTATION_FLIP_VERTICAL: _rotation = 180; _flipX = true; break; case ExifInterface.ORIENTATION_TRANSPOSE: _rotation = 90; _flipX = true; break; case ExifInterface.ORIENTATION_ROTATE_90: _rotation = 90; break; case ExifInterface.ORIENTATION_TRANSVERSE: _rotation = -90; _flipX = true; break; case ExifInterface.ORIENTATION_ROTATE_270: _rotation = -90; break; } break; } } finally { s.close(); } } catch (Exception e) { if(GlobalConfig.isDebug()) Logger.log(e); } }