You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I've started work on a Python icon extracting library for PE files: https://github.com/jlu5/icoextract. It includes a lightweight exe-thumbnailer that wraps around Pillow to convert the extracted .ico file to a .png.
This new thumbnailer addresses some of the shortcomings in the current code, such as #3. My plan is to deprecate the current exe-thumbnailer once icoextract is generally available in distro packages (Debian, Ubuntu).
Goals
Here are some more specific goals:
Offer a consistent, easy to use API for access to Windows icons. This might benefit future developers since it's less cumbersome than running wrestool et al in a subprocess.
Native support for 256x256 large icons. These were introduced in Windows Vista; a decade later, exe-thumbnailer still doesn't support showing them. The new thumbnailer prefers 256x256 icons for large thumbnails and will even resize them to 128x128 for "normal" size thumbnails as needed.
Be fast on large files. Whereas wrestool struggles on large files (and we hard cap the thumbnail size limit as a result), pefile has a fast_load option that allows skipping through most of the binary and only loading the sections we're interested in.
(As a bonus, icoextract being Python makes writing tests a lot easier, making maintenance more manageable in the long run.)
To keep the code simple though, there are some features I'd like to part ways with.
Drop support for .msi and .lnk files. msi files don't include interesting icons, and lnk files most often fail to thumbnail because we can't reliably expand absolute Windows paths on Linux. (.lnk parsing for absolute targets is unreliable #6). In any case, these are separate enough formats that thumbnailing should be handled by different programs.
Drop support for displaying program versions. This complicates the code by having to draw overlays, and I'm not convinced that a thumbnail is the right place to put this data. If you move into e.g. Detailed list view, the box is hardly readable.
Drop bundled 3rd party artwork and show icons as-is. KDE's .exe thumbnailer and Windows already do this.
Dependencies
The new code depends on pefile for extraction and Pillow for thumbnail conversion. Both of these libraries are actively maintained.
The text was updated successfully, but these errors were encountered:
Recently I've started work on a Python icon extracting library for PE files: https://github.com/jlu5/icoextract. It includes a lightweight exe-thumbnailer that wraps around Pillow to convert the extracted .ico file to a .png.
This new thumbnailer addresses some of the shortcomings in the current code, such as #3. My plan is to deprecate the current exe-thumbnailer once icoextract is generally available in distro packages (Debian, Ubuntu).
Goals
Here are some more specific goals:
fast_load
option that allows skipping through most of the binary and only loading the sections we're interested in.To keep the code simple though, there are some features I'd like to part ways with.
Dependencies
The new code depends on pefile for extraction and Pillow for thumbnail conversion. Both of these libraries are actively maintained.
The text was updated successfully, but these errors were encountered: