-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.load.ImageHeaderParser
@RequiresApi(value = Build.VERSION_CODES.O_MR1) public final class ExifInterfaceImageHeaderParser implements ImageHeaderParser
Uses ExifInterface to parse orientation data.
ExifInterface supports the HEIF format on OMR1+. ImageModule 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.
-
-
Method Summary
Modifier and Type Method Description ImageHeaderParser.ImageTypegetType(@NonNull() InputStream is)ImageHeaderParser.ImageTypegetType(@NonNull() ByteBuffer byteBuffer)intgetOrientation(@NonNull() InputStream is, @NonNull() ArrayPool byteArrayPool)Parse the orientation from the image header. intgetOrientation(@NonNull() ByteBuffer byteBuffer, @NonNull() ArrayPool byteArrayPool)-
-
Method Detail
-
getType
@NonNull() ImageHeaderParser.ImageType getType(@NonNull() InputStream is)
-
getType
@NonNull() ImageHeaderParser.ImageType getType(@NonNull() ByteBuffer byteBuffer)
-
getOrientation
int getOrientation(@NonNull() InputStream is, @NonNull() ArrayPool byteArrayPool)
Parse the orientation from the image header. If it doesn't handle this image type (or this isnot an image) it will return a default value rather than throwing an exception.
-
getOrientation
int getOrientation(@NonNull() ByteBuffer byteBuffer, @NonNull() ArrayPool byteArrayPool)
-
-
-
-