You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2016/06/21 14:26:28 UTC
svn commit: r1749526 -
/poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java
Author: nick
Date: Tue Jun 21 14:26:28 2016
New Revision: 1749526
URL: http://svn.apache.org/viewvc?rev=1749526&view=rev
Log:
Provide an alternate method to get the OLE2 thumbnail that decodes
Modified:
poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java
Modified: poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java?rev=1749526&r1=1749525&r2=1749526&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/SummaryInformation.java Tue Jun 21 14:26:28 2016
@@ -620,10 +620,9 @@ public final class SummaryInformation ex
* method is implemented. Please note that the return type is likely to
* change!</strong></p>
*
- * <p><strong>Hint to developers:</strong> Drew Varner <Drew.Varner
- * -at- sc.edu> 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 ex
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);
+ }
+
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org