Giter Club home page Giter Club logo

icoextract's Issues

Extracted icon image is corrupted in GNOME / Nautilus preview

Arch Linux, using the AUR package.

With icoextract installed on my system, the icons are shown correctly on Nautilus or other file managers:
image

But if try to extract the icon with

[faugus@archlinux Adobe Premiere Pro 2023]$ icoextract 'Adobe Premiere Pro.exe' ~/icon-extracted/icon.ico

The extracted icon is distorted/corrupted:
image
image

FR: Transparent background

Hello :)

Great project! It works damm well. But I have 1, no 2 problems:

The icons look like this, I'm 100% sure that this is not correct. The background is not transparent (problem 1) and some exe's have this strange looking standard icon (problem 2). Just take a look for yourself:
image

Besides this it's perfect! Thank you for your work, that really is a great project and should be installed by default if you install wine!

Best, Tim Gromeyer

Conflicting files for 'tests'

Hi, I'm the AUR maintainer of icoextract. I just got notified that it has file conflicts with some other Python packages, notably python-confusables and python-baycomp, and I presume that others may be affected as well.

The error is specifically about site-packages/tests, e.g.:

error: failed to commit transaction (conflicting files)
icoextract: /usr/lib/python3.10/site-packages/tests/__init__.py exists in filesystem (owned by python-confusables)
icoextract: /usr/lib/python3.10/site-packages/tests/__pycache__/__init__.cpython-310.opt-1.pyc exists in filesystem (owned by python-confusables)
icoextract: /usr/lib/python3.10/site-packages/tests/__pycache__/__init__.cpython-310.pyc exists in filesystem (owned by python-confusables)

What may be done to resolve such a conflict?

Upload to PyPI

Hello, friend, this is a good program and it do help me.

But could you upload it to pypi? I hope to find a program that can pip install icoextract and then icoextract src.exe dst.ico.

Any way, thanks for your work!

Different sizing?

In a previous issue #11, I said this:

Ok, yeah, all the icons for system libraries got moved to a new location in Windows 10 1903: https://superuser.com/questions/1480268/icons-no-longer-in-imageres-dll-in-windows-10-1903-4kb-file

I'm not sure if the new DLLs actually embed a reference to the .mun files, or if the system implicitly looks up the right file based on the DLL name. If the latter is true, there's not much icoextract can do other than make a guess.

My version of the C:\Windows\SystemResources\imageres.dll.mun file starts off with the magic bytes of "MZ", typically an executable or a .DLL

And with my second edit, I said, that I needed a different size of the icon. I want the icon to be 48x48 pixels in size, and here's the snippet:

import icoextract as icns

ext = icns.IconExtractor(r"C:\Windows\SystemResources\imageres.dll.mun")
ext.export_icon("foldIcon.ico", num=3)
print("Icon extracted successfully.")

foldIcon.ico is currently 16x16 pixels in size, but I want it to be a 48x48 icon, to be as an PIL image. Can some help me?

New release

Please add a new release for maintainers
Really need this commit in the release:
31ce309

Any documentation on Lib usage ?

Hello,
I am trying to use the Python library rather than the executable. Is it possible ? Is it documented ?
I wonder what data parameters are expected: icoextract.IconExtractor(icon_path, data=?):

class IconExtractor():
    def __init__(self, filename=None, data=None):
        ...

Regards,
Jimmy

Fails on Win11 system DLLs

PS C:\> icolist -v C:\Windows\System32\wpdshext.dll
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "H:\Code\github\lgbatpy\.venv\Scripts\icolist.exe\__main__.py", line 7, in <module>
  File "H:\Code\github\lgbatpy\.venv\Lib\site-packages\icoextract\scripts\icolist.py", line 20, in main
    extractor = IconExtractor(args.input)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\Code\github\lgbatpy\.venv\Lib\site-packages\icoextract\__init__.py", line 56, in __init__
    raise NoIconsAvailableError("File has no group icon resources")
icoextract.NoIconsAvailableError: File has no group icon resources

ImportError: No module named PIL.

It seems that the Pillow isn't dependency for your pip package โ€“ before installing it the following error will occur:

ImportError: No module named PIL

After installing the Pillow with the pip tool, everything seems to work fine for me.

I believe you should add it as the dependency for your pip package to make it less confusing for the newbies.

Gracefully handle DLLs that had icons moved to .mun files (Windows 10 1903+)

Code:

import icoextract as icns

ext = icns.IconExtractor(r"C:\Windows\System32\SHELL32.dll")
extractor.export_icon("foldIcon.ico", num=3)
print("Icon extracted successfully.")

Error:

- Traceback (most recent call last):
-   File "C:\Users\user\Downloads\whistle\icns.py", line 3, in <module>
-     ext = icns.IconExtractor(r"C:\Windows\System32\SHELL32.dll")
-           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "C:\Users\user\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\icoextract\__init__.py", line 56, in __init__
-     raise NoIconsAvailableError("File has no group icon resources")
- icoextract.NoIconsAvailableError: File has no group icon resources

inefficient export (size x20)

My export is more than 20 times less efficient than any other good app.

Command:
C:\waptdev\wapt-packages\oracle-java8-jre-nonfree\windows\x64>"C:\Program Files (x86)\wapt\Scripts\icoextract" "C:\Program Files\Java\jre-1.8\bin\java.exe" ".\WAPT\icon.png"

Result:
image

Have you any tips to improve efficiency of the exported image ?

PS: I see that #13 (comment) is what I need but in my opinion, it would be interesting to have a flag for sizing and make a light export by default with icoextract

Installation instructions seem to not cover KDE

pip3 install icoextract followed by copying exe-thumbnailer.thumbnailer into /usr/local/share/thumbnailers/ works fine for me on XFCE and Gnome, however on KDE/Dolphin this doesn't seem to do the trick.

Is there a different approach required or am I doing sth. wrong?

generate_thumbnail <= 48 pixels

Hello,
I quickly try to generate a 48x48 maximal PNG

import icoextract

def main():
    icoextract.generate_thumbnail(inputfile, outfile, large_size='<=48')

AttributeError: module 'icoextract' has no attribute 'generate_thumbnail'

What I am doing wrong, is it possible ? Will it work if a 48x47 size is found ?

Regards,
Jimmy

Exe-thumbnailer: provide smaller icons

Some executables have custom icons for each size, with different amount of detail.
It would be nice if exe-thumbnailer would provide those different images depending on the zoom level of the file manager.

Currently, only the largest image is provided, which is then scaled down.

exe-thumbnailer.thumbnailer keeps failing to generate thumbnails

I'm on Fedora 36, and I've placed exe-thumbnailer.thumbnailer into /usr/local/share/thumbnailers/, but it keeps failing to generate icons for my EXE files. They always end up as a 1x1 PNG image in the fail directory.
icoextract and icolist themselves work just fine and output correct PNG images.

Any idea what's wrong?

UPDATE: Turns out you have to install it as root or use a virtual environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.