Issue pertains to a possible problem with the method `public int addPicture(byte[] pictureData, int format)` when used in conjunction with the implementation of XSSFWorkbook, where the field `private List<XSSFPictureData> pictures` is not thread-safe. Ideally, there should be a convenient way to add photos while working in multiple threads, for example, by creating a method that takes Sheet, ClientAnchor, and BufferedImage as parameters. Platform Java 17 apache.poi.version - 5.2.5
See item "20. Can I access/modify workbooks/documents/slideshows in multiple threads?" in the FAQ at https://poi.apache.org/help/faq.html "In short: Handling different document-objects in different threads will work. Accessing the same document in multiple threads will not work." Feel free to suggest PRs, but keep in mind that we do not plan to allow to process a single workbook object in multiple threads as it is very hard to do correctly and it would likely degrade performance when processing very large files.