### ImageMagick version

ed06066

### Operating system

Other (enter below)

### Operating system, version and so on

Windows 11, MSYS2 3.4.9

### Description

The latest ImageMagick built on MSYS2 is unable to read PSD files, and `magick identify image.psd` returns

```
identify: ImproperImageHeader `image.psd' @ error/psd.c/ReadPSDImage/2563.
```

I found that after [this line](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/coders/psd.c#L2552), the result of `TellBlob(image)` jumps to 0x4000 so all the parsing afterwards is messed up. It is likely caused by `GetBlobSize` calling [`SyncBlob`](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/MagickCore/blob.c#L1868) which further [calls `fflush`](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/MagickCore/blob.c#L5533) on the input stream.



### Steps to Reproduce

It can be reproduced on any PSD file.

### Images

_No response_
Calling `GetBlobSize` changes file position
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Calling `GetBlobSize` changes file position
Issue date:

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

ed06066

### Operating system

Other (enter below)

### Operating system, version and so on

Windows 11, MSYS2 3.4.9

### Description

The latest ImageMagick built on MSYS2 is unable to read PSD files, and `magick identify image.psd` returns

```
identify: ImproperImageHeader `image.psd' @ error/psd.c/ReadPSDImage/2563.
```

I found that after [this line](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/coders/psd.c#L2552), the result of `TellBlob(image)` jumps to 0x4000 so all the parsing afterwards is messed up. It is likely caused by `GetBlobSize` calling [`SyncBlob`](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/MagickCore/blob.c#L1868) which further [calls `fflush`](https://github.com/ImageMagick/ImageMagick/blob/ed06066387dd3f97cac876d8e52fdb28596f00db/MagickCore/blob.c#L5533) on the input stream.



### Steps to Reproduce

It can be reproduced on any PSD file.

### Images

_No response_
--- end body ---
