public
final
class
FileTransformFactory
extends Object
| java.lang.Object
|
| ↳ |
androidx.camera.view.transform.FileTransformFactory
|
Factory for extracting transform info from image files.
This class is for extracting a OutputTransform from an image file saved by
ImageCapture. The OutputTransform represents the transform being applied to
the original camera buffer, which can be used by CoordinateTransform to transform
coordinates between UseCases.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
public FileTransformFactory ()
Public methods
getOutputTransform
public OutputTransform getOutputTransform (ContentResolver contentResolver,
Uri uri)
Extracts transform info from the given Uri.
| Parameters |
contentResolver |
ContentResolver |
uri |
Uri |
public OutputTransform getOutputTransform (InputStream inputStream)
Extracts transform info from the given InputStream.
| Parameters |
inputStream |
InputStream |
public OutputTransform getOutputTransform (File file)
Extracts transform info from the given File.
isUsingExifOrientation
public boolean isUsingExifOrientation ()
Whether the factory respects the exif of the image file.
setUsingExifOrientation
public void setUsingExifOrientation (boolean usingExifOrientation)
Whether to include the ExifInterface.TAG_ORIENTATION.
By default, this value is false, e.g. loading image with BitmapFactory does
not apply the exif orientation to the loaded Bitmap. Only set this if the exif
orientation is applied to the loaded file. For example, if the image is loaded by a 3P
library that automatically applies exif orientation.
| Parameters |
usingExifOrientation |
boolean |