Bug 63944

Summary: Support alternative text for Escher images
Product: POI Reporter: Branden Visser <mrvisser>
Component: HWPFAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   

Description Branden Visser 2019-11-20 16:18:06 UTC
Hello, when reading the Escher constructor for the org.apache.poi.hwpf.usermodel.Picture object, there is this TODO:

"TODO We need to pass in the PICF data too somehow!"

We would like to request the ability to extract the alternative from Escher images. It looks like this functionality was added as part of 44937 , however support for getting the description appears to be out-scoped.
Comment 1 Branden Visser 2019-11-20 16:21:45 UTC
To clarify, currently, if we run:

org.apache.poi.hwpf.usermodel.Picture.getDescription()

For a picture that is an Escher image, a NullPointerException is thrown:

java.lang.NullPointerException
	at org.apache.poi.hwpf.usermodel.Picture.getDescription(Picture.java:471)

.. using POI 4.1.1.

This is because the image was an escher image and did not have its PICF data initialized, as per the TODO comment.