ExifInterfaceImageHeaderParser

class ExifInterfaceImageHeaderParser : ImageHeaderParser

Uses ExifInterface to parse orientation data.

ExifInterface supports the HEIF format on OMR1+. Glide's DefaultImageHeaderParser doesn't currently support HEIF. In the future we should reconcile these two classes, but for now this is a simple way to ensure that HEIF files are oriented correctly on platforms where they're supported.

Functions

Link copied to clipboard
open fun getOrientation(is: InputStream, byteArrayPool: ArrayPool): Int
Parse the orientation from the image header.
open fun getOrientation(byteBuffer: ByteBuffer, byteArrayPool: ArrayPool): Int
Link copied to clipboard
open fun getType(is: InputStream): ImageHeaderParser.ImageType
open fun getType(byteBuffer: ByteBuffer): ImageHeaderParser.ImageType

Properties

Link copied to clipboard
val UNKNOWN_ORIENTATION: Int
A constant indicating we were unable to parse the orientation from the image either because no exif segment containing orientation data existed, or because of an I/O error attempting to read the exif segment.