How to extract 32x32 icon bitmap data from EXE and convert it into a PIL Image object?
问题 I'm trying to extract a 32x32 icon from an EXE, and convert the bitmap data into an PIL Image object. My final goal is to compare the icon to another 32x32 PNG and get the difference with RMS. I've tried doing win32gui.ExtractIconEx() then win32gui.GetIconInfo() and attemping to Image.open() on that, but PIL doesn't accept PyHANDLE objects, apparently. I've also attemped to open the exe directly with Image.open() , obviously that doesn't work. I'm stumped right now, is there any way this is