Bug 40740

Summary: Unsupported picture type: 7
Product: POI Reporter: Nick Burch <apache>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: patch with the changes
modified code

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