At the moment, I am trying to fins when the Escehr Records are created as the file is parsed. That way, I hope to be able to link together the Blip and Opt records for each image. Dealing withinsertions and deletions ought to be easier using the method that Matthew proposed; I think it will be just a matter of adding linking fields to the appropriate Escher records and updating them as necessary.
If you are looking at the getAllPictures() method, then you might look into something specific. As the record are parsed then and the BSE records discovered, there is a lot of additiona; data that seems not to be parsed. I am wondering if this holds the information we are looking for and the associated records are simply not being recovered from it. If so, then if we can get at an instance of the EscherFactory class it may be possible to recover the additional information we need from this data stream. Sadly, I will not have time to test this today as I am now being shouted at to load the van and set off but do feel it could offer us a way forward. If I have the time to test it myself, I will post again. Yours Mark B TimShiu wrote: > > Thanks for you help on this topic. > > I have tried to "dig" into the POI library to find the linkage between the > image info and the image binary. The only linkage I can find is that there > is an EscherProperty called "BLIP__BLIPTODISPLAY", which is inside the > EscherOptRecord of each image. The hashCode of the BLIP__BLIPTODISPLAY > property is the same as the sequence of the inserted images in the > original Excel. > > Unfortunately, this sequence is not the same as the picture index from the > list returned by getAllPictures() function. It is due to the deletion and > insertion of images in the Excel. > For example, > 1) Insert a image called pic1.jpg in the Excel - hashCode of > BLIP__BLIPTODISPLAY = 1, no of item returned from getAllPictures() is 1. > 2) Insert another image called pic2.jpg in the Excel - hashCode of > BLIP__BLIPTODISPLAY = 1 & 2, no of item returned from getAllPictures() is > 2. > 3) Delete pic1.jpg from the Excel - hashCode of BLIP__BLIPTODISPLAY = 2, > no of item returned from getAllPictures() is 1. > > Currently, I find a workaround by adding a new function to get the > EscherBSERecord from the AbstractEscherHolderRecord which exactly return 2 > items for case 3). (i.e. the BLIP record for the first BSE Record is null) > > Of course.... It is not a good way by using the hashCode as the key for > mapping of image info and binary.... So, I'm long for your better solution > if any. > > Thanks a lot. > > > > -- View this message in context: http://www.nabble.com/Get-image-binary-data-in-Excel-worksheet-with-known-filename-cell-location-tp24413607p24457589.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
