Bug 40740 - Unsupported picture type: 7
Summary: Unsupported picture type: 7
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-12 04:27 UTC by Nick Burch
Modified: 2006-10-17 11:12 UTC (History)
0 users



Attachments
patch with the changes (6.90 KB, patch)
2006-10-17 08:21 UTC, Yegor Kozlov
Details | Diff
modified code (9.24 KB, application/x-zip-compressed)
2006-10-17 08:22 UTC, Yegor Kozlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Burch 2006-10-12 04:27:25 UTC
On <http://www.iisd.org/pdf/2004/sci_cec.ppt>, there's a picture of type 7.
Previously this was throwing a Runtime exception in 

java.lang.RuntimeException: Unsupported picture type: 7
        at
org.apache.poi.hslf.usermodel.PictureData.create(PictureData.java:178)
        at
org.apache.poi.hslf.HSLFSlideShow.readPictures(HSLFSlideShow.java:274)
        at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:134)

I've changed the code to print a warning but not die, but it might be good to
support picture type 7 if we can figure out what it is, or otherwise just
blindly carry the picture data around in a dummy record.
Comment 1 Yegor Kozlov 2006-10-12 05:01:25 UTC
type=7 is Windows DIB. I thought it is obsolete and not supported. 

In PowerPoint 1997 and later DIBs are automatically converted into PNG. 
I will look into it later. 
Thanks.

Yegor
Comment 2 Yegor Kozlov 2006-10-17 08:21:15 UTC
Hi Nick,

I implemented the support of DIB in HSLF.

Now HSLF can handle all types of pictures defined in the escher documentation:
EMF, WMF, PICT, JPEG, PNG and DIB.

The code works fine with http://www.iisd.org/pdf/2004/sci_cec.ppt, all images
including DIBs are extracted.

Regards, 
Yegor
Comment 3 Yegor Kozlov 2006-10-17 08:21:45 UTC
Created attachment 19015 [details]
patch with the changes
Comment 4 Yegor Kozlov 2006-10-17 08:22:03 UTC
Created attachment 19016 [details]
modified code
Comment 5 Nick Burch 2006-10-17 11:12:15 UTC
Excellent, thanks for fixing that. Patch applied