### ImageMagick version

7.1.1.11-1

### Operating system

Windows

### Operating system, version and so on

Windows10 22H2

### Description

I know that ImageMagick is able to generate apng file with specifying "APNG:" before the name of the output image. But when I tried to use its C++ API, Magick++, and using `writeImages()` to create an apng from `Image` object. 

I got all the frames being created and generated separately as: `out-1.png, out-2.png, out-3.png` and so on.

### Steps to Reproduce

```cpp
#include <iostream>
#include <Magick++.h>
#include <string>
#include <vector>

using namespace std;
using namespace Magick;
string src_img = "..."; //source image path
string out_img = "..."; //output image path
vector<Image> fm_src, fm_coal, fm_out;

int main(int argc, char** argv){
    InitializeMagick(*argv);
    int ind = 0;

    readImages(&fm_src, src_img);
    coalesceImages(&fm_coal, fm_src.begin(), fm_src.end());
    for(auto& fm : fm_coal){
        Image pingf;
        pingf.ping(src_img + "[" + to_string(ind) + "]");
        fm.animationDelay(pingf.animationDelay());
        fm_out.emplace_back(fm);
        ind++;
    }
    writeImages(fm_out.begin(), fm_out.end(), out_img, true);
    return 0;
}
```
Try to assemble the apng from the `Image` vector container (`fm_out`) by using `writeImages()`, then I will get all frames created separately as _xxx-1.png, xxx-2.png, xxx-3.png, xxx-4.png ..._

### Images

any image
Failed to create animated PNG (apng)
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Failed to create animated PNG (apng)
Issue date:

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

7.1.1.11-1

### Operating system

Windows

### Operating system, version and so on

Windows10 22H2

### Description

I know that ImageMagick is able to generate apng file with specifying "APNG:" before the name of the output image. But when I tried to use its C++ API, Magick++, and using `writeImages()` to create an apng from `Image` object. 

I got all the frames being created and generated separately as: `out-1.png, out-2.png, out-3.png` and so on.

### Steps to Reproduce

```cpp
#include <iostream>
#include <Magick++.h>
#include <string>
#include <vector>

using namespace std;
using namespace Magick;
string src_img = "..."; //source image path
string out_img = "..."; //output image path
vector<Image> fm_src, fm_coal, fm_out;

int main(int argc, char** argv){
    InitializeMagick(*argv);
    int ind = 0;

    readImages(&fm_src, src_img);
    coalesceImages(&fm_coal, fm_src.begin(), fm_src.end());
    for(auto& fm : fm_coal){
        Image pingf;
        pingf.ping(src_img + "[" + to_string(ind) + "]");
        fm.animationDelay(pingf.animationDelay());
        fm_out.emplace_back(fm);
        ind++;
    }
    writeImages(fm_out.begin(), fm_out.end(), out_img, true);
    return 0;
}
```
Try to assemble the apng from the `Image` vector container (`fm_out`) by using `writeImages()`, then I will get all frames created separately as _xxx-1.png, xxx-2.png, xxx-3.png, xxx-4.png ..._

### Images

any image
--- end body ---

None