Package gov.nih.mipav.model.file
Class MetadataExtractor.GifReader
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractor.GifReader
-
- Enclosing class:
- MetadataExtractor
public class MetadataExtractor.GifReader extends java.lang.Object
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
- Author:
- Drew Noakes https://drewnoakes.com, Kevin Mott https://github.com/kwhopper
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
GIF_87A_VERSION_IDENTIFIER
private static java.lang.String
GIF_89A_VERSION_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description GifReader()
-
Method Summary
-
-
-
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(MetadataExtractor.SequentialReader reader, MetadataExtractor.Metadata metadata)
-
readGifHeader
private MetadataExtractor.GifHeaderDirectory readGifHeader(MetadataExtractor.SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readGifExtensionBlock
private void readGifExtensionBlock(MetadataExtractor.SequentialReader reader, MetadataExtractor.Metadata metadata) throws java.io.IOException
- Throws:
java.io.IOException
-
readPlainTextBlock
private MetadataExtractor.Directory readPlainTextBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
readCommentBlock
private MetadataExtractor.GifCommentDirectory readCommentBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
readApplicationExtensionBlock
private void readApplicationExtensionBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes, MetadataExtractor.Metadata metadata) throws java.io.IOException
- Throws:
java.io.IOException
-
readControlBlock
private MetadataExtractor.GifControlDirectory readControlBlock(MetadataExtractor.SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readImageBlock
private MetadataExtractor.GifImageDirectory readImageBlock(MetadataExtractor.SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
gatherBytes
private byte[] gatherBytes(MetadataExtractor.SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
gatherBytes
private byte[] gatherBytes(MetadataExtractor.SequentialReader reader, int firstLength) throws java.io.IOException
- Throws:
java.io.IOException
-
skipBlocks
private void skipBlocks(MetadataExtractor.SequentialReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-