### ImageMagick version

Version: ImageMagick 7.1.1-32 Q16-HDRI x86_64 e1de8c5eb:20240505

### Operating system

Linux

### Operating system, version and so on

5.15.146.1-microsoft-standard-WSL2

### Description

`identify` and `convert` are outputting incorrect/corrupt data. `icotool` is reporting different sizes from `identify` for indexes 3/5 (icotool indexes 4/6).

`identify`
```
256_1.ico[0] PNG 505x308 505x308+0+0 8-bit sRGB 13030B 0.000u 0:00.009
256_1.ico[1] ICO 202x123 202x123+0+0 8-bit sRGB 0.000u 0:00.009
256_1.ico[2] PNG 707x431 707x431+0+0 8-bit sRGB 16711B 0.000u 0:00.005
256_1.ico[3] ICO 148x148 148x148+0+0 8-bit sRGB 0.000u 0:00.004
256_1.ico[4] PNG 606x370 606x370+0+0 8-bit sRGB 13120B 0.000u 0:00.002
256_1.ico[5] ICO 47x47 47x47+0+0 8-bit sRGB 0.000u 0:00.002
256_1.ico[6] PNG 808x492 808x492+0+0 8-bit sRGB 805702B 0.000u 0:00.000
```

`icotool`
```
--icon --index=1 --width=505 --height=308 --bit-depth=32 --palette-size=0
--icon --index=2 --width=202 --height=123 --bit-depth=32 --palette-size=0
--icon --index=3 --width=707 --height=431 --bit-depth=32 --palette-size=0
--icon --index=4 --width=404 --height=246 --bit-depth=32 --palette-size=0
--icon --index=5 --width=606 --height=370 --bit-depth=32 --palette-size=0
--icon --index=6 --width=303 --height=185 --bit-depth=32 --palette-size=0
--icon --index=7 --width=808 --height=492 --bit-depth=32 --palette-size=0
```

We get corruption on the differing indexes if we use `convert` with:
```
convert 256_1.ico 256_1-d%.png
```

We are attempting to compress file sizes for winforms at: https://github.com/dotnet/winforms/pull/11375

### Steps to Reproduce

```
identify 256_1.ico
icotool -l 256_1.ico
```

### Images

https://github.com/dotnet/winforms/blob/f53f153808bbbaddda3f0c1e994e8a3b5cc085a9/src/System.Windows.Forms.Design/src/Resources/System/WinForms/Design/256_1.ico
identify outputting incorrect sizes for ico file
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : identify outputting incorrect sizes for ico file
Issue date:

--- start body ---
### ImageMagick version

Version: ImageMagick 7.1.1-32 Q16-HDRI x86_64 e1de8c5eb:20240505

### Operating system

Linux

### Operating system, version and so on

5.15.146.1-microsoft-standard-WSL2

### Description

`identify` and `convert` are outputting incorrect/corrupt data. `icotool` is reporting different sizes from `identify` for indexes 3/5 (icotool indexes 4/6).

`identify`
```
256_1.ico[0] PNG 505x308 505x308+0+0 8-bit sRGB 13030B 0.000u 0:00.009
256_1.ico[1] ICO 202x123 202x123+0+0 8-bit sRGB 0.000u 0:00.009
256_1.ico[2] PNG 707x431 707x431+0+0 8-bit sRGB 16711B 0.000u 0:00.005
256_1.ico[3] ICO 148x148 148x148+0+0 8-bit sRGB 0.000u 0:00.004
256_1.ico[4] PNG 606x370 606x370+0+0 8-bit sRGB 13120B 0.000u 0:00.002
256_1.ico[5] ICO 47x47 47x47+0+0 8-bit sRGB 0.000u 0:00.002
256_1.ico[6] PNG 808x492 808x492+0+0 8-bit sRGB 805702B 0.000u 0:00.000
```

`icotool`
```
--icon --index=1 --width=505 --height=308 --bit-depth=32 --palette-size=0
--icon --index=2 --width=202 --height=123 --bit-depth=32 --palette-size=0
--icon --index=3 --width=707 --height=431 --bit-depth=32 --palette-size=0
--icon --index=4 --width=404 --height=246 --bit-depth=32 --palette-size=0
--icon --index=5 --width=606 --height=370 --bit-depth=32 --palette-size=0
--icon --index=6 --width=303 --height=185 --bit-depth=32 --palette-size=0
--icon --index=7 --width=808 --height=492 --bit-depth=32 --palette-size=0
```

We get corruption on the differing indexes if we use `convert` with:
```
convert 256_1.ico 256_1-d%.png
```

We are attempting to compress file sizes for winforms at: https://github.com/dotnet/winforms/pull/11375

### Steps to Reproduce

```
identify 256_1.ico
icotool -l 256_1.ico
```

### Images

https://github.com/dotnet/winforms/blob/f53f153808bbbaddda3f0c1e994e8a3b5cc085a9/src/System.Windows.Forms.Design/src/Resources/System/WinForms/Design/256_1.ico
--- end body ---
