### ImageMagick version

7.1.1-31

### Operating system

Linux

### Operating system, version and so on

Ubuntu 22.04

### Description

Previously:
- #7071
- #6052
- #4987

I have encountered another instance of this class of EXIF/MIFF corruption.

With input images with particular EXIF data, saving to MIFF corrupts the image data.

### Steps to Reproduce

```
magick logo_with_metadata.jpg MIFF:- | magick MIFF:- broken.jpg
```

### Images

logo_with_metadata.jpg:
![logo_with_metadata](https://github.com/ImageMagick/ImageMagick/assets/316852/22d098bf-4b46-4cb3-95e5-528f83b44772)

broken.jpg:
![broken](https://github.com/ImageMagick/ImageMagick/assets/316852/617efe11-d058-4a99-b553-14d12dd1f4fe)

intermediary.miff:
[intermediary.miff.zip](https://github.com/ImageMagick/ImageMagick/files/15077266/intermediary.miff.zip)
Image corruption when writing to MIFF from an input image with particular EXIF (Part 3)
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Image corruption when writing to MIFF from an input image with particular EXIF (Part 3)
Issue date:

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

7.1.1-31

### Operating system

Linux

### Operating system, version and so on

Ubuntu 22.04

### Description

Previously:
- #7071
- #6052
- #4987

I have encountered another instance of this class of EXIF/MIFF corruption.

With input images with particular EXIF data, saving to MIFF corrupts the image data.

### Steps to Reproduce

```
magick logo_with_metadata.jpg MIFF:- | magick MIFF:- broken.jpg
```

### Images

logo_with_metadata.jpg:
![logo_with_metadata](https://github.com/ImageMagick/ImageMagick/assets/316852/22d098bf-4b46-4cb3-95e5-528f83b44772)

broken.jpg:
![broken](https://github.com/ImageMagick/ImageMagick/assets/316852/617efe11-d058-4a99-b553-14d12dd1f4fe)

intermediary.miff:
[intermediary.miff.zip](https://github.com/ImageMagick/ImageMagick/files/15077266/intermediary.miff.zip)
--- end body ---
