aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2016-06-21 14:26:28 +0000
committerNick Burch <nick@apache.org>2016-06-21 14:26:28 +0000
commit8100b33ead773cde1d8f85084e82652d14f524bd (patch)
treef6b6754dd5cb8c1711c0773afa63278f29931ad2 /src/java/org
parent5381a7b8088486d56a0cad6ec7ef58e0fe1f4d95 (diff)
downloadpoi-8100b33ead773cde1d8f85084e82652d14f524bd.tar.gz
poi-8100b33ead773cde1d8f85084e82652d14f524bd.zip
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
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/poi/hpsf/SummaryInformation.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/java/org/apache/poi/hpsf/SummaryInformation.java b/src/java/org/apache/poi/hpsf/SummaryInformation.java
index d25aa58e27..5c260187c0 100644
--- a/src/java/org/apache/poi/hpsf/SummaryInformation.java
+++ b/src/java/org/apache/poi/hpsf/SummaryInformation.java
@@ -620,10 +620,9 @@ public final class SummaryInformation extends SpecialPropertySet {
* method is implemented. Please note that the return type is likely to
* change!</strong></p>
*
- * <p><strong>Hint to developers:</strong> Drew Varner &lt;Drew.Varner
- * -at- sc.edu&gt; said that this is an image in WMF or Clipboard (BMP?)
- * format. However, we won't do any conversion into any image type but
- * instead just return a byte array.</p>
+ * <p>To process this data, you may wish to make use of the
+ * {@link Thumbnail} class. The raw data is generally
+ * an image in WMF or Clipboard (BMP?) format</p>
*
* @return The thumbnail or <code>null</code>
*/
@@ -632,6 +631,20 @@ public final class SummaryInformation extends SpecialPropertySet {
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);
+ }
+
/**