Package gov.nih.mipav.model.file
Class MetadataExtractor.GifReader
java.lang.Object
gov.nih.mipav.model.file.MetadataExtractor.GifReader
- Enclosing class:
MetadataExtractor
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidextract(MetadataExtractor.SequentialReader reader, MetadataExtractor.Metadata metadata) private byte[]private byte[]gatherBytes(MetadataExtractor.SequentialReader reader, int firstLength) private voidreadApplicationExtensionBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes, MetadataExtractor.Metadata metadata) readCommentBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) private voidreadGifExtensionBlock(MetadataExtractor.SequentialReader reader, MetadataExtractor.Metadata metadata) private MetadataExtractor.DirectoryreadPlainTextBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) private void
-
Field Details
-
GIF_87A_VERSION_IDENTIFIER
- See Also:
-
GIF_89A_VERSION_IDENTIFIER
- See Also:
-
-
Constructor Details
-
GifReader
public GifReader()
-
-
Method Details
-
extract
-
readGifHeader
private MetadataExtractor.GifHeaderDirectory readGifHeader(MetadataExtractor.SequentialReader reader) throws IOException - Throws:
IOException
-
readGifExtensionBlock
private void readGifExtensionBlock(MetadataExtractor.SequentialReader reader, MetadataExtractor.Metadata metadata) throws IOException - Throws:
IOException
-
readPlainTextBlock
private MetadataExtractor.Directory readPlainTextBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) throws IOException - Throws:
IOException
-
readCommentBlock
private MetadataExtractor.GifCommentDirectory readCommentBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes) throws IOException - Throws:
IOException
-
readApplicationExtensionBlock
private void readApplicationExtensionBlock(MetadataExtractor.SequentialReader reader, int blockSizeBytes, MetadataExtractor.Metadata metadata) throws IOException - Throws:
IOException
-
readControlBlock
private MetadataExtractor.GifControlDirectory readControlBlock(MetadataExtractor.SequentialReader reader) throws IOException - Throws:
IOException
-
readImageBlock
private MetadataExtractor.GifImageDirectory readImageBlock(MetadataExtractor.SequentialReader reader) throws IOException - Throws:
IOException
-
gatherBytes
- Throws:
IOException
-
gatherBytes
private byte[] gatherBytes(MetadataExtractor.SequentialReader reader, int firstLength) throws IOException - Throws:
IOException
-
skipBlocks
- Throws:
IOException
-