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

Not directly related to oxipng, but do you or anyone else know of something that works similarly for .ico files? #440

Open
Jieiku opened this issue May 28, 2022 · 23 comments

Comments

@Jieiku
Copy link

Jieiku commented May 28, 2022

I absolutely love oxipng, it is my new favorite PNG optimizer.

I have been using it like this (Is it possible to get more compression? did I miss any of the advanced options?):

oxipng -o max --strip all -a -Z *.png

I am wondering if there is a tool that does something similar for .ico files? (I still have one of these for old browser compatibility)

@TPS
Copy link

TPS commented May 29, 2022

FileOptimizer has a toolchain for .ico.

@Jieiku
Copy link
Author

Jieiku commented May 29, 2022

Seems to be windows software (unless i am wrong?) If anyone know of something that runs on Linux let me know, preferably with the command line but does not have to be.

I can try running this under wine if I get some time to mess around with that.

Just found this: https://jaydenseric.com/blog/favicon-optimization

can probably take the png files from oxipng and merge them into an ico file with imagemagik's convert command

convert 16.png 32.png 48.png favicon.ico

(going to give it a try now)

NOPE it takes my 3 ~130 byte png files and turns them into a 14.7kb huge ico file. Gimp did a better job than this (627kb)

@TPS
Copy link

TPS commented May 29, 2022

According to FO's current code, it runs (directly on .ico) in this order

  • magick.exe convert INPUTFILE -quiet -compress ZIP

  • leanify.exe -q -p

Probably tweak those parameters some, as FO changes them based on GUI options. Both tools support Linux.

@Jieiku
Copy link
Author

Jieiku commented May 29, 2022

ahhh good eye, I gave that a go, but does not work:

2022-05-29_12-37-00

It might be the format of the ico that causes it, will see if I can figure it out:

https://github.com/JayXon/Leanify#icon-file-ico

@TPS
Copy link

TPS commented May 30, 2022

leanify v0.4.3 is ancient. Have you tried building from current source? Did you try running imagemagick w/ those parameters 1st? I don't hear much from anyone re: optimizing .ico & I've had mixed results myself.

@Jieiku
Copy link
Author

Jieiku commented May 30, 2022

I did look, it seemed to be the latest: https://github.com/JayXon/Leanify/releases (unless I am looking in the wrong places.)

it seems ico support is just not as good as png support:
2022-05-30_05-33-53

@TPS
Copy link

TPS commented May 30, 2022

He hasn't released binaries in a very long time. You have to build from source to get 7 years of improvements. Last commit 4 months ago even improved Linux compilation.

@Jieiku
Copy link
Author

Jieiku commented Jun 4, 2022

Had something come up with a short deadline, going to take another look at this tomorrow. (or possibly this evening)

@Jieiku
Copy link
Author

Jieiku commented Jun 9, 2022

Gave this a try this evening, but was unable to build, I opened a ticket there though: JayXon/Leanify#84

@Jieiku
Copy link
Author

Jieiku commented Jun 9, 2022

Yes, my icon was already compressed by GIMP, Leanify took it farther:

./leanify -i 9999 favicon.ico
Processing: favicon.ico
2.59 KB -> 1.90 KB      Leanified: 703 B (26.53%)

The favicon.ico went from 2650 bytes to 1947 bytes.

Thank you very much for recommending, and for prodding me again to try it!

WoW, it even further reduced the size of the png files that I had already processed with oxipng.

@TPS
Copy link

TPS commented Jun 10, 2022

No 1 tool is perfect, or even close to it by itself, but using many can approach state-of-the-art. Try FileOptimizer any way you can — it's the best I've found in the last decade or so.

@javiergutierrezchamorro

FileOptimizer has a toolchain for .ico.

Thank you for suggesting

@TPS
Copy link

TPS commented Jul 13, 2022

Thank you for suggesting

@javiergutierrezchamorro Thank you for improving FO all these years. 🙇🏾‍♂️

@Zerowalker
Copy link

Would be nice if Oxipng added support for .ico, though I get that it's niche.
But isn't ICO essentially the same as a png file, just a different structure to support multiple files in one?

@TPS
Copy link

TPS commented Jul 13, 2024

But isn't ICO essentially the same as a png file, just a different structure to support multiple files in one?

Umm, no. .ico can contain .png, but is otherwise entirely a different format.

@TPS
Copy link

TPS commented Jul 13, 2024

Would be nice if Oxipng added support for .ico, though I get that it's niche.

You're essentially looking for leanify, which is designed to also work on archive formats, which .ico practically is.

FileOptimizer might be even better.

@andrews05
Copy link
Collaborator

Maybe you could suggest leanify adopt oxipng 😄
FileOptimizer does include it now.

@Zerowalker
Copy link

But isn't ICO essentially the same as a png file, just a different structure to support multiple files in one?

Umm, no. .ico can contain .png, but is otherwise entirely a different format.

That's basically what I meant, but thought it was only png files, so my bad:)

@dustdfg
Copy link

dustdfg commented Dec 3, 2024

Does anyone knows similar thing but for webp?

@TPS
Copy link

TPS commented Dec 3, 2024

FileOptimizer might be even better.

@dustdfg In general, this is the answer to all such questions. @javiergutierrezchamorro is very diligent in collecting optimizers in FO.

@javiergutierrezchamorro
Copy link

FileOptimizer might be even better.

@dustdfg In general, this is the answer to all such questions. @javiergutierrezchamorro is very diligent in collecting optimizers in FO.

Thank you!

@dustdfg
Copy link

dustdfg commented Dec 3, 2024

FileOptimizer might be even better.

@dustdfg In general, this is the answer to all such questions. @javiergutierrezchamorro is very diligent in collecting optimizers in FO.

Yeah, I hate windows and switched from that crap years ago and I think I don't need it that much if it requires windows experience again but thank you for recommendation

@TPS
Copy link

TPS commented Dec 3, 2024

Yeah, I hate windows and switched from that crap years ago and I think I don't need it that much if it requires windows experience again but thank you for recommendation

@dustdfg FO runs fine under Wine. Try & see.

@javiergutierrezchamorro As always, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants