### ImageMagick version

7.1.0-62 Q16-HDRI aarch64 20885

### Operating system

MacOS

### Operating system, version and so on

13.2 on Mac M1 Max

### Description

When an animated png (APNG) is constructed from several separate PNGs, the resulting APNG is much greater than the sum of all the input PNG images. Normally, I would expect an APNG to be a similar size as the sum of the images, or potentially smaller.

I've attached an example with 5 images totally 250kB; when assembled into an APNG, the resulting file is 3.4MB. It's unclear to me how the file got to be that big; even maintaining the original compression of the image (ie, not taking advantage of inter-frame optimizations) I would expect to result in a much smaller file.

As a comparison, `apngasm` produces a file that is 540kb, and uses much less time. I'd expect that ImageMagick can do significantly better in this situation, even with a somewhat naive approach.

### Steps to Reproduce

```bash
magick -delay 50 -loop 0 resize_0.png resize_1.png resize_2.png resize_3.png resize_4.png resize_3.png resize_2.png resize_1.png APNG:resize.png
```

### Images

[resize_img.zip](https://github.com/ImageMagick/ImageMagick/files/10940013/resize_img.zip)

APNG: unreasonably large sizes compared to separate PNG files
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : APNG: unreasonably large sizes compared to separate PNG files
Issue date:

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

7.1.0-62 Q16-HDRI aarch64 20885

### Operating system

MacOS

### Operating system, version and so on

13.2 on Mac M1 Max

### Description

When an animated png (APNG) is constructed from several separate PNGs, the resulting APNG is much greater than the sum of all the input PNG images. Normally, I would expect an APNG to be a similar size as the sum of the images, or potentially smaller.

I've attached an example with 5 images totally 250kB; when assembled into an APNG, the resulting file is 3.4MB. It's unclear to me how the file got to be that big; even maintaining the original compression of the image (ie, not taking advantage of inter-frame optimizations) I would expect to result in a much smaller file.

As a comparison, `apngasm` produces a file that is 540kb, and uses much less time. I'd expect that ImageMagick can do significantly better in this situation, even with a somewhat naive approach.

### Steps to Reproduce

```bash
magick -delay 50 -loop 0 resize_0.png resize_1.png resize_2.png resize_3.png resize_4.png resize_3.png resize_2.png resize_1.png APNG:resize.png
```

### Images

[resize_img.zip](https://github.com/ImageMagick/ImageMagick/files/10940013/resize_img.zip)

--- end body ---
