I have the path to an exe.
How do I get a Vec<RgbaImage<u8>> of the images contained within?
I'm fine using Windows-specific APIs.
I'm also using Bevy, so math structs from that is preferred.
I have the path to an exe.
How do I get a Vec<RgbaImage<u8>> of the images contained within?
I'm fine using Windows-specific APIs.
I'm also using Bevy, so math structs from that is preferred.
Copyright © 2021 Jogjafile Inc.
We can extract the icon handles from the exe, then convert the icon handles to
imagecrate images.The error handling is probably wonky, but this should be enough to get started.
https://github.com/TeamDman/Cursor-Hero/blob/51611380997d74f74f76fa776be4892a9906c005/crates/winutils/src/win_icons.rs
https://github.com/TeamDman/Cursor-Hero/blob/51611380997d74f74f76fa776be4892a9906c005/crates/math/src/shuffle.rs
This uses the
bgra_to_rgbafn, which is accelerated using SIMD