Bug 39991 - HSLF: pictures in the stream identified by offset, not by UID
Summary: HSLF: pictures in the stream identified by offset, not by UID
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-07 14:17 UTC by Yegor Kozlov
Modified: 2006-07-14 02:17 UTC (History)
0 users



Attachments
patch with the fix (1.65 KB, patch)
2006-07-07 14:18 UTC, Yegor Kozlov
Details | Diff
org.apache.poi.hslf.model.Picture (5.73 KB, application/octet-stream)
2006-07-07 14:18 UTC, Yegor Kozlov
Details
org.apache.poi.hslf.usermodel.PictureData (5.50 KB, application/octet-stream)
2006-07-07 14:19 UTC, Yegor Kozlov
Details
org.apache.poi.hslf.usermodel.PictureData (5.76 KB, application/octet-stream)
2006-07-14 06:13 UTC, Yegor Kozlov
Details
org.apache.poi.hslf.model.Picture (5.73 KB, application/octet-stream)
2006-07-14 06:13 UTC, Yegor Kozlov
Details
patch with the fix (2.42 KB, patch)
2006-07-14 06:14 UTC, Yegor Kozlov
Details | Diff
org.apache.poi.hslf.usermodel.SlideShow (24.27 KB, application/octet-stream)
2006-07-14 06:15 UTC, Yegor Kozlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yegor Kozlov 2006-07-07 14:17:40 UTC
Pictures in the stream are identified by the offset which is stored in
EscherBSERecord.
Current code finds image data by its 16-byte checksum (UID). It doesn't work in 
all cases. I have a sample created on MAC where the UID stored in the
EscherBSERecord and
the UID in the Pictures OLE stream are not the same. 

Idea to find images by offset is much better and works in all cases.

Yegor
Comment 1 Yegor Kozlov 2006-07-07 14:18:13 UTC
Created attachment 18571 [details]
patch with the fix
Comment 2 Yegor Kozlov 2006-07-07 14:18:45 UTC
Created attachment 18572 [details]
org.apache.poi.hslf.model.Picture
Comment 3 Yegor Kozlov 2006-07-07 14:19:06 UTC
Created attachment 18573 [details]
org.apache.poi.hslf.usermodel.PictureData
Comment 4 Nick Burch 2006-07-13 09:39:19 UTC
Just went to commit this, but the test "usermodel.TestPictures" fails

It seems that PictureData just has 0 for the offset. Is there another patch
we're missing, to correctly populate that?
Comment 5 Yegor Kozlov 2006-07-14 06:13:20 UTC
Created attachment 18600 [details]
org.apache.poi.hslf.usermodel.PictureData
Comment 6 Yegor Kozlov 2006-07-14 06:13:50 UTC
Created attachment 18601 [details]
org.apache.poi.hslf.model.Picture
Comment 7 Yegor Kozlov 2006-07-14 06:14:09 UTC
Created attachment 18602 [details]
patch with the fix
Comment 8 Yegor Kozlov 2006-07-14 06:15:03 UTC
Created attachment 18603 [details]
org.apache.poi.hslf.usermodel.SlideShow
Comment 9 Yegor Kozlov 2006-07-14 06:16:40 UTC
My bad.
I re-attached the patch and modified files.
Now it should work fine.

Yegor
Comment 10 Nick Burch 2006-07-14 09:17:20 UTC
That one looks happier :)

Thanks for these patches, I've committed them.