docs.rs failed to build thumbcache-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
thumbcache
Uses Windows thumbcache to get bmp preview for a file.
Usage
When trying to get preview from file that is not an image (.zip or .exe) will throw error. May also throw error if preview does not exists. So it's better to check for errors rather than relying on .unwrap() or ? syntax.
use ;
Sources
When I was writing this thing I used sources below. Also, I have used ChatGPT because I am not a Rust developer in first place and not very familiar with C or WinAPI. Worth mentioning in my opinion.
https://stackoverflow.com/questions/14207618/get-bytes-from-hbitmap
https://stackoverflow.com/questions/21751747/extract-thumbnail-for-any-file-in-windows