Package com.drew.metadata.gif
Class GifReader
java.lang.Object
com.drew.metadata.gif.GifReader
Reader of GIF encoded data.
Resources:
- https://wiki.whatwg.org/wiki/GIF
- https://www.w3.org/Graphics/GIF/spec-gif89a.txt
- http://web.archive.org/web/20100929230301/http://www.etsimo.uniovi.es/gifanim/gif87a.txt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidextract(SequentialReader reader, Metadata metadata) private static byte[]gatherBytes(SequentialReader reader) private static byte[]gatherBytes(SequentialReader reader, int firstLength) private static voidreadApplicationExtensionBlock(SequentialReader reader, int blockSizeBytes, Metadata metadata) private static GifCommentDirectoryreadCommentBlock(SequentialReader reader, int blockSizeBytes) private static GifControlDirectoryreadControlBlock(SequentialReader reader) private static voidreadGifExtensionBlock(SequentialReader reader, Metadata metadata) private static GifHeaderDirectoryreadGifHeader(SequentialReader reader) private static GifImageDirectoryreadImageBlock(SequentialReader reader) private static DirectoryreadPlainTextBlock(SequentialReader reader, int blockSizeBytes) private static voidskipBlocks(SequentialReader reader)
-
Field Details
-
GIF_87A_VERSION_IDENTIFIER
- See Also:
-
GIF_89A_VERSION_IDENTIFIER
- See Also:
-
-
Constructor Details
-
GifReader
public GifReader()
-
-
Method Details
-
extract
-
readGifHeader
- Throws:
IOException
-
readGifExtensionBlock
private static void readGifExtensionBlock(SequentialReader reader, Metadata metadata) throws IOException - Throws:
IOException
-
readPlainTextBlock
private static Directory readPlainTextBlock(SequentialReader reader, int blockSizeBytes) throws IOException - Throws:
IOException
-
readCommentBlock
private static GifCommentDirectory readCommentBlock(SequentialReader reader, int blockSizeBytes) throws IOException - Throws:
IOException
-
readApplicationExtensionBlock
private static void readApplicationExtensionBlock(SequentialReader reader, int blockSizeBytes, Metadata metadata) throws IOException - Throws:
IOException
-
readControlBlock
- Throws:
IOException
-
readImageBlock
- Throws:
IOException
-
gatherBytes
- Throws:
IOException
-
gatherBytes
- Throws:
IOException
-
skipBlocks
- Throws:
IOException
-