Struct ico::IconDirEntry [] [src]

pub struct IconDirEntry { /* fields omitted */ }

One entry in an ICO or CUR file; a single icon or cursor.

Methods

impl IconDirEntry
[src]

[src]

Returns the type of resource stored in this entry, either an icon or a cursor.

[src]

Returns the width of the image, in pixels.

[src]

Returns the height of the image, in pixels.

[src]

Returns the bits-per-pixel (color depth) of the image. Returns zero if self.resource_type() == ResourceType::Cursor (since CUR files store hotspot coordinates in place of this field).

[src]

Returns the coordinates of the cursor hotspot (pixels right from the left edge of the image, and pixels down from the top edge), or None if self.resource_type() != ResourceType::Cursor.

[src]

Returns true if the image is encoded as a PNG, or false if it is encoded as a BMP.

[src]

Returns the raw, encoded image data.

[src]

Decodes this entry into an image. Returns an error if the data is malformed or can't be decoded.

[src]

Encodes an image in a new entry. The encoding method is chosen automatically based on the image. Returns an error if the encoding fails.

[src]

Encodes an image as a BMP in a new entry. The color depth is determined automatically based on the image. Returns an error if the encoding fails.

[src]

Encodes an image as a PNG in a new entry. The color depth is determined automatically based on the image. Returns an error if the encoding fails.

Trait Implementations

impl Clone for IconDirEntry
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more