Bug 63944 - Support alternative text for Escher images
Summary: Support alternative text for Escher images
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: unspecified
Hardware: PC Mac OS X 10.1
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-20 16:18 UTC by Branden Visser
Modified: 2019-12-15 08:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.