docs: private static void extractImageData(@NotNull final EpsDirectory directory, String imageData) throws IOException
      {
          // %ImageData: 1000 1000 8 3 1 1000 7 "beginimage"
          directory.setString(EpsDirectory.TAG_IMAGE_DATA, imageData.trim());
  
          String[] imageDataParts = imageData.split(" ");
  
          int width = Integer.parseInt(imageDataParts[0]);
          int height = Integer.parseInt(imageDataParts[1]);
          int colorType = Integer.parseInt(imageDataParts[3]);
  
          // Only add values that are not already present
          if (!directory.containsTag(EpsDirectory.TAG_IMAGE_WIDTH))
              directory.setInt(EpsDirectory.TAG_IMAGE_WIDTH, width);
          if (!directory.containsTag(EpsDirectory.TAG_IMAGE_HEIGHT))
              directory.setInt(EpsDirectory.TAG_IMAGE_HEIGHT, height);
          if (!directory.containsTag(EpsDirectory.TAG_COLOR_TYPE))
              directory.setInt(EpsDirectory.TAG_COLOR_TYPE, colorType);
  
          if (!directory.containsTag(EpsDirectory.TAG_RAM_SIZE)) {
              int bytesPerPixel = 0;
              if (colorType == 1)
                  bytesPerPixel = 1; // grayscale
              else if (colorType == 2 || colorType == 3)
                  bytesPerPixel = 3; // Lab or RGB
              else if (colorType == 4)
                  bytesPerPixel = 3; // CMYK
  
              if (bytesPerPixel != 0)
                  directory.setInt(EpsDirectory.TAG_RAM_SIZE, bytesPerPixel * width * height);
          }
      }