FileTransformFactory


class 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

Public constructors

Public functions

OutputTransform

Extracts transform info from the given File.

OutputTransform

Extracts transform info from the given InputStream.

OutputTransform
getOutputTransform(contentResolver: ContentResolver, uri: Uri)

Extracts transform info from the given Uri.

Boolean

Whether the factory respects the exif of the image file.

Unit
setUsingExifOrientation(usingExifOrientation: Boolean)

Whether to include the TAG_ORIENTATION.

Public constructors

FileTransformFactory

Added in 1.1.0
FileTransformFactory()

Public functions

getOutputTransform

Added in 1.1.0
fun getOutputTransform(file: File): OutputTransform

Extracts transform info from the given File.

getOutputTransform

Added in 1.1.0
fun getOutputTransform(inputStream: InputStream): OutputTransform

Extracts transform info from the given InputStream.

getOutputTransform

Added in 1.1.0
fun getOutputTransform(contentResolver: ContentResolver, uri: Uri): OutputTransform

Extracts transform info from the given Uri.

isUsingExifOrientation

Added in 1.1.0
fun isUsingExifOrientation(): Boolean

Whether the factory respects the exif of the image file.

setUsingExifOrientation

Added in 1.1.0
fun setUsingExifOrientation(usingExifOrientation: Boolean): Unit

Whether to include the 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.