docs: private void readImageResources(final boolean pParseData) throws IOException {
          readHeader();
  
          if (pParseData && metadata.imageResources == null || metadata.layerAndMaskInfoStart == 0) {
              imageInput.seek(metadata.imageResourcesStart);
  
              long imageResourcesLength = imageInput.readUnsignedInt();
  
              if (pParseData && metadata.imageResources == null && imageResourcesLength > 0) {
                  long expectedEnd = imageInput.getStreamPosition() + imageResourcesLength;
                  metadata.imageResources = new ArrayList<>();
  
                  while (imageInput.getStreamPosition() < expectedEnd) {
                      PSDImageResource resource = PSDImageResource.read(imageInput);
                      metadata.imageResources.add(resource);
                  }
  
                  if (DEBUG) {
                      System.out.println("imageResources: " + metadata.imageResources);
                  }
  
                  if (imageInput.getStreamPosition() != expectedEnd) {
                      throw new IIOException("Corrupt PSD document"); // ..or maybe just a bug in the reader.. ;-)
                  }
              }
  
              // TODO: We should now be able to flush input
  //                imageInput.flushBefore(metadata.imageResourcesStart + imageResourcesLength + 4);
  
              metadata.layerAndMaskInfoStart = metadata.imageResourcesStart + imageResourcesLength + 4; // + 4 for the length field itself
          }
      }