png2ico is widely used in open source projects. Sadly, it does not support input files >= 256x256 pixels. According to the Icon Handbook 256x256pixel icons are used in Windows since Vista.
One option is to use the provided convert tool by ImageMagick. The problem with this is, the references in open source projects have to be changed, which sometimes is not quite that easy. This is where png2ImageMagickICO kicks in.
It is a simple script, which takes the input syntax of png2ico, converts it to the onput syntax of ImageMagick and passes it over. Therefore, the only thing that has to be exchanged is the png2ico.exe itself.
To keep things simple, the source file is an ordinary Windows batch file. There are several ways to convert a .bat file into a Windows executable, for example the Bat-To-Exe-Converter official | Web Archive | GitHub mirror
To avoid PATH bindings, it is possible to include ImageMagick's convert.exe into the generated executable. convert.exe of ImageMagick version 7.0.8-11 Q16 is available within this repo. It can, of course, easily exchanged.
- Download/Install the Bat To Exe Converter
- Download/Clone this repo
- Start the Bat To Exe Converter
- Open the png2ImageMagickICO.bat
- Click on "Embed" on the right side and add the ImageMagick files
- Optionally: Set Version Information or other Options
- Click convert
- Replace the original png2ico.exe
This solution was tested and is working with Nextcloud