分类: Java
2010-01-06 13:43:17
The GIF image metadata format encodes the image descriptor, local color table, and extension information assciated with a single image within a GIF file, typically a frame of an animation.
The image description contains the offset of the frame within the logical screen described in the stream metadata, as well as the width and height of the frame and whether it is used interlaced encoding.
The local color table, if present, supersedes the global color table for the frame at hand.
The graphic control extension contains information on how the frame is
to be incorporated into the animation. The disposal method indicates
whether the current frame should remain in place
(doNotDispose
), be restored to the backgound color as
specified in the stream metadata
(restoreToBackgroundColor
), or be restored to the
previous frame contents (restoreToPrevious
) prior to
displaying the subsequent frame.
The user input flag indicates whether the animation should pause for user input before advancing to the next frame. The transparent color flag and index indicate a color index for which pixels of the frame should not be drawn. The delay time indicates how long the frame should be displayed, in hundredths of a second. If the user input flag is set and the delay time is 0, the frame is intended to be advanced only on user input.
LocalColorTable?, GraphicControlExtension?, PlainTextExtension?,
ApplicationExtensions?, CommentExtensions?)>
#REQUIRED>
"4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED>
#REQUIRED>
"doNotDispose" | "restoreToBackgroundColor" |
"restoreToPrevious" | "undefinedDisposalMethod4" |
"undefinedDisposalMethod5" | "undefinedDisposalMethod6" |
"undefinedDisposalMethod7") #REQUIRED>
"FALSE") #REQUIRED>
"TRUE" | "FALSE") #REQUIRED>
#CDATA #REQUIRED>
#REQUIRED>
#REQUIRED>
#REQUIRED>
#REQUIRED>
#REQUIRED>
#REQUIRED>
]>
Standard Metadata Component | GIF Native Stream Metadata Component |
---|---|
/Chroma/Palette/PaletteEntry@index | /GlobalColorTable/ColorTableEntry@index |
/Chroma/Palette/PaletteEntry@red | /GlobalColorTable/ColorTableEntry@red |
/Chroma/Palette/PaletteEntry@green | /GlobalColorTable/ColorTableEntry@green |
/Chroma/Palette/PaletteEntry@blue | /GlobalColorTable/ColorTableEntry@blue |
/Chroma/BackgroundIndex@value | /GlobalColorTable@backgroundColorIndex |
/Data/BitsPerSample@value | /LogicalScreenDescriptor@colorResolution |
/Dimension/PixelAspectRatio@value | /LogicalScreenDescriptor@pixelAspectRatio |
/Dimension/HorizontalScreenSize@value | /LogicalScreenDescriptor@logicalScreenWidth |
/Dimension/VerticalScreenSize@value | /LogicalScreenDescriptor@logicalScreenHeight |
/Document/FormatVersion@value | /Version@value |
Standard Metadata Component | GIF Native Image Metadata Component |
---|---|
/Chroma/Palette/PaletteEntry@index | /LocalColorTable/ColorTableEntry@index |
/Chroma/Palette/PaletteEntry@red | /LocalColorTable/ColorTableEntry@red |
/Chroma/Palette/PaletteEntry@green | /LocalColorTable/ColorTableEntry@green |
/Chroma/Palette/PaletteEntry@blue | /LocalColorTable/ColorTableEntry@blue |
/Dimension/HorizontalPixelOffset@value | /ImageDescriptor@imageLeftPosition |
/Dimension/VerticalPixelOffset@value | /ImageDescriptor@imageTopPosition |
/Text/TextEntry@value | /CommentExtensions/CommentExtension@value |
/Transparency/TransparentIndex@value | /GraphicControlExtension@transparentColorIndex (/GraphicControlExtension@transparentColorFlag is also set to "TRUE") |