Struct immeta::formats::gif::Metadata [] [src]

pub struct Metadata {
    pub version: Version,
    pub dimensions: Dimensions,
    pub global_color_table: Option<ColorTable>,
    pub color_resolution: u16,
    pub background_color_index: u8,
    pub pixel_aspect_ratio: u8,
    pub blocks: Vec<Block>,
}

Contains metadata about the whole GIF image.

Fields

GIF format version from the file header.

Logical screen dimensions of the image.

Information about global color table, if it is present.

Number of colors available to the original image.

Quoting the GIF spec:

Number of bits per primary color available to the original image, minus 1. This value represents the size of the entire palette from which the colors in the graphic were selected, not the number of colors actually used in the graphic. For example, if the value in this field is 3, then the palette of the original image had 4 bits per primary color available to create the image. This value should be set to indicate the richness of the original palette, even if not every color from the whole palette is available on the source machine.

Note that the value in this structure is the number of colors, not the number of bits.

Index of the default background color in the global color table.

A factor which defines the aspect ration of a pixel in the original image.

Quoting from the GIF spec:

Factor used to compute an approximation of the aspect ratio of the pixel in the original image. If the value of the field is not 0, this approximation of the aspect ratio is computed based on the formula:

Aspect Ratio = (Pixel Aspect Ratio + 15) / 64

The Pixel Aspect Ratio is defined to be the quotient of the pixel's width over its height. The value range in this field allows specification of the widest pixel of 4:1 to the tallest pixel of 1:4 in increments of 1/64th.

If zero, no information about pixel aspect ratio is available.

See also pixel_aspect_ratio_approx() method.

Metadata for each block in the GIF image.

Methods

impl Metadata
[src]

[src]

Computes pixel aspect ratio approximation, if it is available.

See pixel_aspect_ration field documentation.

[src]

Computes the number of frames, i.e. the number of image descriptor blocks.

[src]

Returns true if the image is animated, false otherwise.

This is currently decided based on the number of frames. If there are more than one frames, then the image is considered animated.

Trait Implementations

impl Clone for Metadata
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Metadata
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Metadata
[src]

impl Debug for Metadata
[src]

[src]

Formats the value using the given formatter. Read more

impl LoadableMetadata for Metadata
[src]

[src]

Loads the implementing type from the given buffered input stream.

[src]

Loads the implementing type from the given buffered and seekable input stream. Read more

[src]

Loads the implementing type from a file specified by the given path. Read more

[src]

Loads the implementing type from an in-memory buffer. Read more