Bug 51172

Summary: [Patch] Add GIF support for images
Product: POI Reporter: Stefan Stern <stefan.stern>
Component: XWPFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Adds GIF-relation and GIF-constant
Add testcase for GIF support
Missing line in constants-array in XWPFPictureData
Test-Document as separate attachement

Description Stefan Stern 2011-05-09 07:04:51 UTC
Created attachment 26973 [details]
Adds GIF-relation and GIF-constant

Embedded GIF images are not supported in XWPF, the relations are not recognized. This patch adds the relation constants and enables POI to recognize GIF images.
Comment 1 Nick Burch 2011-05-09 07:09:24 UTC
Any chance of a very simple word file, say with a .gif and a .jpg image in it? That'd then be used in a unit test for this new functionality
Comment 2 Stefan Stern 2011-05-09 07:21:55 UTC
TestCase is in progress. Second patch about to come.
Comment 3 Stefan Stern 2011-05-09 07:40:41 UTC
Created attachment 26974 [details]
Add testcase for GIF support

This patch contains a small Word DOCX (created with Word 2010), that contains some Lorem-Ipsum text and a GIF image. 
Testcase checks if the GIF-part is there, if it is related with the document.xml part and if it was created properly according to the XWPFRelation constants settings.
Comment 4 Stefan Stern 2011-05-09 12:32:45 UTC
Created attachment 26978 [details]
Missing line in constants-array in XWPFPictureData

Sorry, missed to check the XWPFPictureData class when I created the patch. Here is the rest.
Comment 5 Nick Burch 2011-05-13 11:00:17 UTC
Any chance you could upload the test .docx file on its own? Only I can't get it out of the patch without it getting corrupted :/
Comment 6 Nick Burch 2011-05-13 11:06:10 UTC
Main patch applied, thanks. If you could upload just the sample file, I can do the test too
Comment 7 Stefan Stern 2011-05-16 06:42:36 UTC
Created attachment 27003 [details]
Test-Document as separate attachement

Here is the test-data file. Sorry for the delay.
Comment 8 Nick Burch 2011-05-27 13:35:48 UTC
Thanks, test added in r1128301.