Bug 60200 - Unable to create proper png thumbnail of a Slide having tiff images inside
Summary: Unable to create proper png thumbnail of a Slide having tiff images inside
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.15-FINAL
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-04 12:38 UTC by Ashok Kumar
Modified: 2016-11-02 23:40 UTC (History)
0 users



Attachments
https://www.dropbox.com/s/1nn63al8rzxtdkc/testtiff.pptx?dl=0 (60 bytes, text/plain)
2016-10-04 12:41 UTC, Ashok Kumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashok Kumar 2016-10-04 12:38:33 UTC
Failed to convert a slide with tiff image to a proper png thumbnail as drawContent method in DrawPictureShape class uses BitMapImageRenderer which do not support rendering of tiff file format as per the documentation - https://poi.apache.org/apidocs/org/apache/poi/sl/draw/BitmapImageRenderer.html 

ImageIO.getImageReaders(iis); call returns null as there is no tiff IMage reader available. 

is there any recommended 3rd party plugin for rendering tiff images?

Attached is a test pptx file with one slide having a tiff image inside.
Comment 2 Andreas Beeker 2016-10-04 14:56:57 UTC
Maybe you can provide your own Image Renderer delegate with the help of [1]?

Currently I don't have time to check the code, but I think either the image renderer itself or at least the calling code, which is instantiated by the DrawFactory can be overridden.

[1] https://github.com/haraldk/TwelveMonkeys
Comment 3 Andreas Beeker 2016-11-02 23:40:35 UTC
Just validated the use of TwelveMonkey. Just reference/include the jars under [1] in your project and the TIFF is rendered, i.e. it works out of the box.



[1] https://github.com/haraldk/TwelveMonkeys#user-content-manual-dependency-example