diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py
index e5173a1fb..49d8ef97c 100644
--- a/src/PIL/ImageFile.py
+++ b/src/PIL/ImageFile.py
@@ -243,7 +243,6 @@ class ImageFile(Image.Image):
                                 if LOAD_TRUNCATED_IMAGES:
                                     break
                                 else:
-                                    self.tile = []
                                     raise IOError(
                                         "image file is truncated "
                                         "(%d bytes not processed)" % len(b)
diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index 10e18e4a0..f69ca0466 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -612,7 +612,7 @@ class PngImageFile(ImageFile.ImageFile):
             rawmode, data = self.png.im_palette
             self.palette = ImagePalette.raw(rawmode, data)
 
-        self.__idat = length  # used by load_read()
+        self.__prepare_idat = length  # used by load_prepare()
 
     @property
     def text(self):
@@ -645,6 +645,7 @@ class PngImageFile(ImageFile.ImageFile):
         if self.info.get("interlace"):
             self.decoderconfig = self.decoderconfig + (1,)
 
+        self.__idat = self.__prepare_idat  # used by load_read()
         ImageFile.ImageFile.load_prepare(self)
 
     def load_read(self, read_bytes):

Conversion of image to array fails
Tried to load and convert an image (attached) to a numpy array. Fails on first try, succeeds on second. Strange! 

Guessing cause may be that the image is slightly corrupted, but this is not detected or reported by PIL. 

### What are your OS, Python and Pillow versions?

* OS: Windows 10 pro
* Python: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
* Pillow: 6.0.0

![doesNotConvertToArray](https://user-images.githubusercontent.com/8694392/58248803-6ca9ab00-7d5d-11e9-9dc0-ca024bf63915.jpg)

```python
import numpy as np
from PIL import Image
# This image is to some extent corrupted, but is displayed correctly by viewing programs:
im = Image.open("doesNotConvertToArray.jpg") 
a1 = np.asarray(im) # First conversion fails
print(repr(a1))
# Only a singleton object array is printed: 
# array(<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=2703x1018 at 0x1AA4F6E1048>, dtype=object)

a2 = np.asarray(im) # Succeeds, strangely
print(a2.shape) # Prints correct shape: (1018, 2703, 3)
```

diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py
index 4ade11a29..a9ba54dd1 100644
--- a/Tests/test_file_jpeg.py
+++ b/Tests/test_file_jpeg.py
@@ -372,6 +372,10 @@ class TestFileJpeg(PillowTestCase):
         with self.assertRaises(IOError):
             im.load()
 
+        # Test that the error is raised if loaded a second time
+        with self.assertRaises(IOError):
+            im.load()
+
     def _n_qtables_helper(self, n, test_file):
         im = Image.open(test_file)
         f = self.tempfile("temp.jpg")
diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py
index 83170cb2a..87bba7c2f 100644
--- a/Tests/test_imagefile.py
+++ b/Tests/test_imagefile.py
@@ -113,6 +113,10 @@ class TestImageFile(PillowTestCase):
         with self.assertRaises(IOError):
             im.load()
 
+        # Test that the error is raised if loaded a second time
+        with self.assertRaises(IOError):
+            im.load()
+
     def test_truncated_without_errors(self):
         if "zip_encoder" not in codecs:
             self.skipTest("PNG (zlib) encoder not available")

pip install -e .[dev]
parse_log_pytest
requirements.txt
apt-get update apt-get install -y gcc libjpeg-dev zlib1g-dev libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
black==25.1.0
blessed==1.20.0
build==1.2.2.post1
certifi==2025.1.31
charset-normalizer==3.4.1
check-manifest==0.50
click==8.1.8
cov-core==1.15.0
coverage==7.8.0
coveralls==4.0.1
docopt==0.6.2
docutils==0.21.2
exceptiongroup==1.2.2
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
jarn.viewdoc==2.7
Jinja2==3.1.6
MarkupSafe==3.0.2
mypy-extensions==1.0.0
olefile==0.47
packaging==24.2
pathspec==0.12.1
-e git+https://github.com/python-pillow/Pillow.git@1c57a41ececc4529520a423b9bec13c78927cb25#egg=Pillow
platformdirs==4.3.7
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.1
Pygments==2.19.1
pyproject_hooks==1.2.0
pyroma==4.2
pytest==8.3.5
pytest-cov==6.0.0
pytz==2025.2
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
trove-classifiers==2025.3.19.19
typing_extensions==4.13.0
urllib3==2.3.0
wcwidth==0.2.13
zipp==3.21.0

name: Pillow
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - black==25.1.0
      - blessed==1.20.0
      - build==1.2.2.post1
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - check-manifest==0.50
      - click==8.1.8
      - cov-core==1.15.0
      - coverage==7.8.0
      - coveralls==4.0.1
      - docopt==0.6.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jarn-viewdoc==2.7
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mypy-extensions==1.0.0
      - olefile==0.47
      - packaging==24.2
      - pathspec==0.12.1
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pygments==2.19.1
      - pyproject-hooks==1.2.0
      - pyroma==4.2
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytz==2025.2
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - trove-classifiers==2025.3.19.19
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - wcwidth==0.2.13
      - zipp==3.21.0
prefix: /opt/conda/envs/Pillow

Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_throws_IOError Tests/test_imagefile.py::TestImageFile::test_truncated_with_errors
Tests/test_file_jpeg.py::TestFileJpeg::test_MAXBLOCK_scaling Tests/test_file_jpeg.py::TestFileJpeg::test_app Tests/test_file_jpeg.py::TestFileJpeg::test_bad_mpo_header Tests/test_file_jpeg.py::TestFileJpeg::test_cmyk Tests/test_file_jpeg.py::TestFileJpeg::test_dpi Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_zero_division Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_from_dpcm_exif Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_int_from_exif Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_tuple_from_exif Tests/test_file_jpeg.py::TestFileJpeg::test_exif Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps_typeerror Tests/test_file_jpeg.py::TestFileJpeg::test_exif_rollback Tests/test_file_jpeg.py::TestFileJpeg::test_exif_typeerror Tests/test_file_jpeg.py::TestFileJpeg::test_ff00_jpeg_header Tests/test_file_jpeg.py::TestFileJpeg::test_icc Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big Tests/test_file_jpeg.py::TestFileJpeg::test_ifd_offset_exif Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif Tests/test_file_jpeg.py::TestFileJpeg::test_junk_jpeg_header Tests/test_file_jpeg.py::TestFileJpeg::test_large_exif Tests/test_file_jpeg.py::TestFileJpeg::test_large_icc_meta Tests/test_file_jpeg.py::TestFileJpeg::test_load_dpi_rounding Tests/test_file_jpeg.py::TestFileJpeg::test_mp Tests/test_file_jpeg.py::TestFileJpeg::test_no_dpi_in_exif Tests/test_file_jpeg.py::TestFileJpeg::test_no_duplicate_0x1001_tag Tests/test_file_jpeg.py::TestFileJpeg::test_optimize Tests/test_file_jpeg.py::TestFileJpeg::test_optimize_large_buffer Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop Tests/test_file_jpeg.py::TestFileJpeg::test_progressive Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_cmyk_buffer Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_compat Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer_highest_quality Tests/test_file_jpeg.py::TestFileJpeg::test_qtables Tests/test_file_jpeg.py::TestFileJpeg::test_quality Tests/test_file_jpeg.py::TestFileJpeg::test_quality_keep Tests/test_file_jpeg.py::TestFileJpeg::test_sanity Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes Tests/test_file_jpeg.py::TestFileJpeg::test_save_dpi_rounding Tests/test_file_jpeg.py::TestFileJpeg::test_save_tiff_with_dpi Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes Tests/test_file_jpeg.py::TestFileJpeg::test_smooth Tests/test_file_jpeg.py::TestFileJpeg::test_subsampling Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_should_read_all_the_data Tests/test_imagefile.py::TestImageFile::test_broken_datastream_with_errors Tests/test_imagefile.py::TestImageFile::test_broken_datastream_without_errors Tests/test_imagefile.py::TestImageFile::test_ico Tests/test_imagefile.py::TestImageFile::test_parser Tests/test_imagefile.py::TestImageFile::test_raise_ioerror Tests/test_imagefile.py::TestImageFile::test_raise_typeerror Tests/test_imagefile.py::TestImageFile::test_safeblock Tests/test_imagefile.py::TestImageFile::test_truncated_without_errors Tests/test_imagefile.py::TestPyDecoder::test_exif_interop Tests/test_imagefile.py::TestPyDecoder::test_exif_jpeg Tests/test_imagefile.py::TestPyDecoder::test_exif_png Tests/test_imagefile.py::TestPyDecoder::test_exif_webp Tests/test_imagefile.py::TestPyDecoder::test_extents_none Tests/test_imagefile.py::TestPyDecoder::test_negsize Tests/test_imagefile.py::TestPyDecoder::test_no_format Tests/test_imagefile.py::TestPyDecoder::test_oversize Tests/test_imagefile.py::TestPyDecoder::test_setimage
src/PIL/PngImagePlugin.py src/PIL/ImageFile.py
src/PIL/PngImagePlugin.py src/PIL/ImageFile.py