Imgbot icon indicating copy to clipboard operation
Imgbot copied to clipboard

What tool is Imgbot using to achieve its results?

Open K0-RR opened this issue 2 years ago • 7 comments

Is it optipng, imagemagick or sth else?

K0-RR avatar Aug 15 '21 17:08 K0-RR

It is Magick.NET (https://github.com/dlemstra/Magick.NET) that has it's own code and some ImageMagick code to optimize the files.

dlemstra avatar Aug 15 '21 18:08 dlemstra

I have no experience with ImageMagick or your .NET library but I have some with Oxipng and it seems to always be better than Imgbot. I can tell you more about this tool and link some PRs - Imgbot ones and mine with Oxipng for the same files so you can compare.

If you are not interested / don't see a way to make use of this tool in Imgbot then just close this issue.

K0-RR avatar Aug 16 '21 10:08 K0-RR

For PNG compression it might be a good idea to search for an alternative. Feel free to research this.

dlemstra avatar Aug 16 '21 14:08 dlemstra

I did some tests and then forgot about this. A few days ago I discovered another tool - https://github.com/JayXon/Leanify and it seems to outperform anything else. Running more tests and will post results later.

The problem is - leanify optimizes many formats but there is no option to exclude some of them so if it sees JSON or xml files it makes them hard to read - minified. Screenshot from 2021-09-03 17-08-23

Unless someone PRs a "fix" to Leanify the only way to use it for image-only optimization is to make a copy of the repo first, run leanify on the copy, and then move all image files to the original directory. This can be easily done with a bash script.

K0-RR avatar Sep 09 '21 12:09 K0-RR

It's been a month, and I'm interested in this! How are the tests coming?

jbmagination avatar Oct 18 '21 17:10 jbmagination

Is there any progress for this issue or any code where you tried to integrate leanify into our optimization that we can look at ? I think a good way to implement and test other optimizer will be following the hints from here: https://github.com/imgbot/Imgbot/issues/467 which are already implemented. ie. you need to create another compressor that extends the ICompress interface. Let us know what you think, if there is a way we can integrate the suggested optimizer ( leanify ) or we should close the issue ? Also here is an example of how to add an optimizer: https://github.com/imgbot/Imgbot/pull/654

GrigoreMihai avatar Oct 26 '21 19:10 GrigoreMihai

The ImageOptim app has a wide range of tools to investigate possibly using: https://imageoptim.com/mac Specifically, it uses all of:

  • oxipng
  • pngcrush
  • mozjpeg
  • zopfli
  • advpng
  • jpegoptim
  • gifsicle
  • svgo
  • svgcleaner
  • pngout

cooljeanius avatar Sep 24 '23 21:09 cooljeanius