public final class ExifInterfaceImageHeaderParser extends Object implements ImageHeaderParser
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.
ImageHeaderParser.ImageType
UNKNOWN_ORIENTATION
Constructor and Description |
---|
ExifInterfaceImageHeaderParser() |
Modifier and Type | Method and Description |
---|---|
int |
getOrientation(ByteBuffer byteBuffer,
ArrayPool byteArrayPool) |
int |
getOrientation(InputStream is,
ArrayPool byteArrayPool)
Parse the orientation from the image header.
|
ImageHeaderParser.ImageType |
getType(ByteBuffer byteBuffer) |
ImageHeaderParser.ImageType |
getType(InputStream is) |
@NonNull public ImageHeaderParser.ImageType getType(@NonNull InputStream is) throws IOException
getType
in interface ImageHeaderParser
IOException
@NonNull public ImageHeaderParser.ImageType getType(@NonNull ByteBuffer byteBuffer) throws IOException
getType
in interface ImageHeaderParser
IOException
public int getOrientation(@NonNull InputStream is, @NonNull ArrayPool byteArrayPool) throws IOException
ImageHeaderParser
getOrientation
in interface ImageHeaderParser
IOException
public int getOrientation(@NonNull ByteBuffer byteBuffer, @NonNull ArrayPool byteArrayPool) throws IOException
getOrientation
in interface ImageHeaderParser
IOException