### ImageMagick version

7.1.1.-6

### Operating system

Linux

### Operating system, version and so on

Debian 12

### Description

writing a file to STDOUT using convert seems not working for PNG,
but it works for JFIF.


### Steps to Reproduce

writing a file to STDOUT using convert seems not working for PNG

```
$ magick convert out.gif png:- | wc -c
0

$ magick -list format | grep PNG
     APNG  VIDEO     rw+   Animated Portable Network Graphics
      JNG* PNG       rw-   JPEG Network Graphics
      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.6.39)
      PNG* PNG       rw-   Portable Network Graphics (libpng 1.6.39)
           See http://www.libpng.org/ for details about the PNG format.
    PNG00* PNG       rw-   PNG inheriting bit-depth, color-type from original, if possible
    PNG24* PNG       rw-   opaque or binary transparent 24-bit RGB
    PNG32* PNG       rw-   opaque or transparent 32-bit RGBA
    PNG48* PNG       rw-   opaque or binary transparent 48-bit RGB
    PNG64* PNG       rw-   opaque or transparent 64-bit RGBA
     PNG8* PNG       rw-   8-bit indexed with optional binary transparency
```

but it works for JFIF, the reason is not clear:

```
$ magick convert out.gif jpg:- | wc -c
26513

$ magick convert out.gif jpg:- | magick display -
OK

$ magick -list format | grep JFIF
      JPE* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
      JPS* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
    PJPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
```



### Images

_No response_
convert to STDOUT does work for PNG
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : convert to STDOUT does work for PNG
Issue date:

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

7.1.1.-6

### Operating system

Linux

### Operating system, version and so on

Debian 12

### Description

writing a file to STDOUT using convert seems not working for PNG,
but it works for JFIF.


### Steps to Reproduce

writing a file to STDOUT using convert seems not working for PNG

```
$ magick convert out.gif png:- | wc -c
0

$ magick -list format | grep PNG
     APNG  VIDEO     rw+   Animated Portable Network Graphics
      JNG* PNG       rw-   JPEG Network Graphics
      MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.6.39)
      PNG* PNG       rw-   Portable Network Graphics (libpng 1.6.39)
           See http://www.libpng.org/ for details about the PNG format.
    PNG00* PNG       rw-   PNG inheriting bit-depth, color-type from original, if possible
    PNG24* PNG       rw-   opaque or binary transparent 24-bit RGB
    PNG32* PNG       rw-   opaque or transparent 32-bit RGBA
    PNG48* PNG       rw-   opaque or binary transparent 48-bit RGB
    PNG64* PNG       rw-   opaque or transparent 64-bit RGBA
     PNG8* PNG       rw-   8-bit indexed with optional binary transparency
```

but it works for JFIF, the reason is not clear:

```
$ magick convert out.gif jpg:- | wc -c
26513

$ magick convert out.gif jpg:- | magick display -
OK

$ magick -list format | grep JFIF
      JPE* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
      JPS* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
    PJPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.1.5)
```



### Images

_No response_
--- end body ---
