Created attachment 28974 [details] The patch to fix extraction problems. HSLF had some code to chop off 16 bytes of "Mac data" from some PNGs; I found samples of the same thing in Word and Excel so I've applied a similar fix to those formats too. Also fixed HSLF to look for the PNG header instead of using ImageIO to load up the whole image.
Created attachment 28975 [details] Word document with the problem.
Created attachment 28976 [details] Powerpoint document with the problem.
Created attachment 28977 [details] Exce; document with the problem.
Can you add some unit tests that assert that POI can read PNGs with "mac headers"? The patch looks good but I'm reluctant to apply it without tests. Regards, Yegor
Hi Yegor, I'm a bit tied up at the moment with other things but I'll try to add some unit tests in a week or so. Cheers, Luke
Created attachment 29110 [details] Patch to add unit tests. Here is a patch to add unit tests. I had to delete the test data out of the patch because it was too big to upload to bugzilla. I just used each of the three sample files attached previously. Cheers, Luke
Thanks for the patch, applied oin r1369263 Regards, Yegor