Provide an alternate method to get the OLE2 thumbnail that decodes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1749526 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2016-06-21 14:26:28 +00:00
parent 0f3a7b24b4
commit fdb7c7d1ff

View File

@ -620,10 +620,9 @@ public final class SummaryInformation extends SpecialPropertySet {
* method is implemented. Please note that the return type is likely to * method is implemented. Please note that the return type is likely to
* change!</strong></p> * change!</strong></p>
* *
* <p><strong>Hint to developers:</strong> Drew Varner &lt;Drew.Varner * <p>To process this data, you may wish to make use of the
* -at- sc.edu&gt; said that this is an image in WMF or Clipboard (BMP?) * {@link Thumbnail} class. The raw data is generally
* format. However, we won't do any conversion into any image type but * an image in WMF or Clipboard (BMP?) format</p>
* instead just return a byte array.</p>
* *
* @return The thumbnail or <code>null</code> * @return The thumbnail or <code>null</code>
*/ */
@ -632,6 +631,20 @@ public final class SummaryInformation extends SpecialPropertySet {
return (byte[]) getProperty(PropertyIDMap.PID_THUMBNAIL); return (byte[]) getProperty(PropertyIDMap.PID_THUMBNAIL);
} }
/**
* <p>Returns the thumbnail (or <code>null</code>), processed
* as an object which is (largely) able to unpack the thumbnail
* image data.</p>
*
* @return The thumbnail or <code>null</code>
*/
public Thumbnail getThumbnailThumbnail()
{
byte[] data = getThumbnail();
if (data == null) return null;
return new Thumbnail(data);
}
/** /**