flip an ico-image without quality loss or size increase

2018-05-14 11:05:20

My goal is to take an ico-image, like this wikipedia.ico and flip it vertically. My first attempt was

$ convert -flip wikipedia.ico flipped.ico

And it works, except that the resulting file flipped.ico is larger than the original:

$ identify wikipedia.ico

wikipedia.ico[0] ICO 48x48 48x48+0+0 4-bit sRGB 2734B 0.000u 0:00.000

wikipedia.ico[1] ICO 32x32 32x32+0+0 4-bit sRGB 2734B 0.000u 0:00.000

wikipedia.ico[2] ICO 16x16 16x16+0+0 4-bit sRGB 2734B 0.000u 0:00.000

$ identify flipped.ico

flipped.ico[0] ICO 48x48 48x48+0+0 8-bit sRGB 15086B 0.000u 0:00.000

flipped.ico[1] ICO 32x32 32x32+0+0 8-bit sRGB 15086B 0.000u 0:00.000

flipped.ico[2] ICO 16x16 16x16+0+0 8-bit sRGB 15086B 0.000u 0:00.000

Adding the flag -depth 4 does not help.

How can I do I get the exact same image, simply flipped?