[−][src]Module pelite::resources::group
Group Icons and Cursors.
References:
- http://msdn.microsoft.com/en-us/library/ms997538.aspx
- https://devblogs.microsoft.com/oldnewthing/20120720-00/?p=7083
- https://github.com/MathewSachin/NIco/wiki/Ico,-Cur-and-PE-Formats
Examples
The following example prints all group icon resource names which contain a PNG image.
// Aqcuire the resources of a Portable Executable file let resources: pelite::resources::Resources; // Iterate over the group icons in the resources and throw away any invalid results // If the resources contain no group icons the iterator is empty for (name, group) in resources.group_icons().filter_map(Result::ok) { // Enumerate the entries in the group for entry in group.entries() { // Fetch the image data for this entry match group.image(entry.nId) { Ok(image) => { // Check if the image data starts with the PNG magic bytes if image.starts_with(b"\x89PNG") { println!("{}: contains PNG", name); } }, Err(err) => { println!("{}: Error {}!", name, err) }, } } }
Modules
image |
Structs
GroupResource | Group resources, Icons and Cursors. |
Enums
ResourceType | Icon or Cursor type. |
Type Definitions
GroupCursor | Group Cursor. |
GroupIcon | Group Icon. |