Package com.drew.metadata.gif
Class GifReader
- java.lang.Object
-
- com.drew.metadata.gif.GifReader
-
public class GifReader extends java.lang.ObjectReader 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 Modifier and Type Field Description private static java.lang.StringGIF_87A_VERSION_IDENTIFIERprivate static java.lang.StringGIF_89A_VERSION_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description GifReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidextract(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 Detail
-
GIF_87A_VERSION_IDENTIFIER
private static final java.lang.String GIF_87A_VERSION_IDENTIFIER
- See Also:
- Constant Field Values
-
GIF_89A_VERSION_IDENTIFIER
private static final java.lang.String GIF_89A_VERSION_IDENTIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
extract
public void extract(SequentialReader reader, Metadata metadata)
-
readGifHeader
private static GifHeaderDirectory readGifHeader(SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readGifExtensionBlock
private static void readGifExtensionBlock(SequentialReader reader, Metadata metadata) throws java.io.IOException
- Throws:
java.io.IOException
-
readPlainTextBlock
private static Directory readPlainTextBlock(SequentialReader reader, int blockSizeBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
readCommentBlock
private static GifCommentDirectory readCommentBlock(SequentialReader reader, int blockSizeBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
readApplicationExtensionBlock
private static void readApplicationExtensionBlock(SequentialReader reader, int blockSizeBytes, Metadata metadata) throws java.io.IOException
- Throws:
java.io.IOException
-
readControlBlock
private static GifControlDirectory readControlBlock(SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readImageBlock
private static GifImageDirectory readImageBlock(SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
gatherBytes
private static byte[] gatherBytes(SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
gatherBytes
private static byte[] gatherBytes(SequentialReader reader, int firstLength) throws java.io.IOException
- Throws:
java.io.IOException
-
skipBlocks
private static void skipBlocks(SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-