Package com.bumptech.glide.load
Interface ImageHeaderParser
- All Known Implementing Classes:
DefaultImageHeaderParser,ExifInterfaceImageHeaderParser
public interface ImageHeaderParser
Interface for the ImageHeaderParser.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe format of the image data including whether or not the image may include transparent pixels. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA 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. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrientation(InputStream is, ArrayPool byteArrayPool) Parse the orientation from the image header.intgetOrientation(ByteBuffer byteBuffer, ArrayPool byteArrayPool) getType(InputStream is) getType(ByteBuffer byteBuffer)
-
Field Details
-
UNKNOWN_ORIENTATION
static final int UNKNOWN_ORIENTATIONA 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.- See Also:
-
-
Method Details
-
getType
- Throws:
IOException
-
getType
- Throws:
IOException
-
getOrientation
Parse the orientation from the image header. If it doesn't handle this image type (or this is not an image) it will return a default value rather than throwing an exception.- Returns:
- The exif orientation if present or -1 if the header couldn't be parsed or doesn't contain an orientation
- Throws:
IOException
-
getOrientation
int getOrientation(@NonNull ByteBuffer byteBuffer, @NonNull ArrayPool byteArrayPool) throws IOException - Throws:
IOException
-