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