Open elachlan opened 2 months ago
I was able to shrink alignment.ico
from 54kb to 10kb. But Image Magick required extracting them first and then recombining.
I was able to shrink
alignment.ico
from 54kb to 10kb. But Image Magick required extracting them first and then recombining.
alignment.ico can be 2.5 kB. ImageMagick will still store them as BMP for some reason (with a smaller bit depth, but still uncompressed BMP). Try this instead:
sudo apt install imagemagick --install-recommends
sudo apt install icoutils
convert alignment.ico alignment.png
icotool -c -o alignment-new.ico -r alignment-0.png -r alignment-1.png -r alignment-2.png -r alignment-3.png -r alignment-4.png -r alignment-5.png -r alignment-6.png
If we don't lose individual icon sizes and the rendered bitmap is identical, then I'm fine with this.
The process we used unpacks the icon into individual image files for each size contained. Then converts the images to png to compress them and repacks them into the ico. As far as I could tell they are identical on the files I checked.
In #9911 it was discovered that the embedded
ICO
resource files have a non-trivial size and could be losslessly compressed upwards of 90% of original file size.We should use GIMP or similar tool to shrink each of the
ICO
files and maybe investigate the use of PNG to reduce file sizes.