Interface ImageHeaderParser

    • Field Detail

      • UNKNOWN_ORIENTATION

        static final int UNKNOWN_ORIENTATION
        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.
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        @NonNull
        ImageHeaderParser.ImageType getType​(@NonNull
                                            java.io.InputStream is)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getType

        @NonNull
        ImageHeaderParser.ImageType getType​(@NonNull
                                            java.nio.ByteBuffer byteBuffer)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getOrientation

        int getOrientation​(@NonNull
                           java.io.InputStream is,
                           @NonNull
                           ArrayPool byteArrayPool)
                    throws java.io.IOException
        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:
        java.io.IOException
      • getOrientation

        int getOrientation​(@NonNull
                           java.nio.ByteBuffer byteBuffer,
                           @NonNull
                           ArrayPool byteArrayPool)
                    throws java.io.IOException
        Throws:
        java.io.IOException