Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example code which can extract multiple icons as one .ico file #258

Closed
tapika opened this issue Nov 12, 2022 · 3 comments
Closed

Add example code which can extract multiple icons as one .ico file #258

tapika opened this issue Nov 12, 2022 · 3 comments

Comments

@tapika
Copy link

tapika commented Nov 12, 2022

See following answer: https://stackoverflow.com/a/74411477/2338477

Would it be possible to code example which would replace IconLib.Unofficial nuget package use ?

@tapika
Copy link
Author

tapika commented Nov 13, 2022

Hmm... There exists also following article if it can be used ?

@rngcntr
Copy link
Contributor

rngcntr commented Nov 14, 2022

Hi @tapika!

I have discussed the possibility to export multiple icons as single .ico files with other contributors. Our goal was to align this implementation with the behavior of other popular PE file utilities in terms of exporting the same formats etc.
IIRC, neither CFF Explorer nor Resource Hacker pack multiple icons into one file so we decided not to do so either. Anybody who explicitly needs to have the icons packed in a single file, can still use the icons extracted by PeNet and handle the rest themselves. However, If you would like to see this feature and think others might need it as well, you are free to open a PR of course.

@tapika
Copy link
Author

tapika commented Nov 14, 2022

I think this PR already opened, unless you close it.

Florian Grieskamp was also asking on .exe samples which can be used for testing - you can use these readytorun executable file for example: https://github.com/tapika/swupd/releases

Btw - I have tried to locate software I have used once upon a time to check multiple icons - and there exists
greenfish icon editor pro 4.0, which is freeware and can be used for testing.

And shimgen from here can be even used for roundtrip testing - so you extract icon, provide it to .net compiler, and get it back to another executable.

shimgen.exe --path="C:\Users\user\Downloads\choco.exe" --output=shortcut.exe --iconpath="C:\Users\user\Downloads\choco.exe" --debug

@secana secana closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants