I wanted to make a file browser which has the correct file icons for each file type, instead of just getting them from the file name. This is a bad solution, since it has to call images from disc and may be wrong if the name is different. This method uses the Windows API to get the exact icon. Tested in Python 3.6 in Windows 10. from win32com.shell import shell, shellcon from PIL import Image, ImageTk import win32api import win32con import win32ui import win32gui def get_icon(PATH, size): SHGFI_ICON = 0x000000100 SHGFI_ICONLOCATION = 0x000001000 if size == "small": SHIL_SIZE= 0x00001 elif size == "large": SHIL_SIZE= 0x00002 else: raise TypeError("Invalid argument for 'size'. Must be equal to 'small' or 'large'") ret, info = shell.SHGetFileInfo(PATH, 0, SHGFI_ICONLOCATION | SHGFI_ICON | SHIL_SIZE) hIcon, iIcon, dwAttr, name, typeName = info ico_x =
Here for the download? Click here to jump to the downloads I have been frustrated with the image viewer that comes with Windows 10 for a while now, and I have been working on an alternative; a simpler app, that does not need internet access. The result is this: EEHPH2: Blazing fast Many users have found the Photos app to be slow and clunky on older PCs. EEHPH was designed from the top to be speedy on low-powered computers. This graph shows how long it took to open a 1080p image on an AMD A9-9420, a fairly slow processor. Built-in image transformations Save images resized, maintaining ratio, flip and rotate images in the program: Easy to open images Opening images is as easy as with any other image viewer. Right Click and Open with or set as the default image viewer for opening with a single click. Open Source Want to modify the code, fix bugs or help development? EEHPH is fully open source with a GNU license. Source code is maint