You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Marius Volkhart <Ma...@volkhart.com> on 2020/12/09 21:40:54 UTC

Modifying picture in HSSF

Hello,

I'm working on a project that requires me to update the images inside an
HSSF document. HSSFPictureData does not have any methods for modifying the
EscherBlipRecord backing it, and does not expose the record directly. I'm
working around this by using reflection to access the EscherBlipRecord blip
field.  Initial testing suggests this works.

Is there a better way to do this that I am missing? Are there any known
issues doing this?

If not, I'd like to work on contributing a proper API for doing this. My
first thought here is to mirror the setPictureData methods of
EscherBlipRecord to HSSFPictureData, but I haven't thought much about it.
Any thoughts, particularly around whether or not such a change is of
interest, are most welcome.

--
Cheers,
Marius Volkhart