*** empty log message ***

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Klute 2002-04-29 08:20:51 +00:00
parent 263d320010
commit 3b94d8f427
2 changed files with 297 additions and 2 deletions

View File

@ -33,9 +33,10 @@
</li> </li>
<li> <li>
<p>The <link href="#sec3">third section</link> tells how to read <p>The <link href="#sec3">third section</link> tells how to read
non-standard properties. Non-standard properties are application-specific non-standard properties. Non-standard properties are application-specific
name/value/type triples.</p> name/value/type triples. <em>This section is still to be written. Look up
the API documentation for the time being!</em></p>
</li> </li>
</ol> </ol>

View File

@ -0,0 +1,294 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN//">
<html>
<head>
<title>Structure of the byte[] returned by SummaryInformation's
getThumbnailMethod()</title>
</head>
<body>
<p>This is a rough HTML file that describes the structure of the byte[] returned by SummaryInformation's getThumbnailMethod() when it is implemented
like this (simply remove the Exception it currently throws):</p>
<p>
/**
* &lt;p&gt;Returns the stream's thumbnail (or &lt;code&gt;null&lt;/code&gt;)&lt;/p&gt;
*/
public byte[] getThumbnail()
{
return (byte[]) getProperty(PropertyIDMap.PID_THUMBNAIL);
}
</p>
<p>Assumptions:</p>
<ul>
<li><p>A Windows machine saved the info</p>
</li>
<li><p>the info is saved in the recommended METAFILE format (Clipboard metafile)</p>
</li>
</ul>
<p>The standard WMF file byte array begins at position 24 of the array (beginning
of WindowsMetaHeader struct) and ends with the end of the array.
The first 24 bytes are Cliboard specific headers. (VT_CF - Variant Type
Clipboard Format)</p>
<address>Drew Varner, Drew.Varner -at- sc.edu</address>
<table border="1">
<tr>
<td>&nbsp;</td>
<td colspan="10">byte[] returned by SummaryInformation.getThumbnail()</td>
</tr>
<tr>
<td>Sample Data</td>
<td>71</td>
<td>20660</td>
<td>-1</td>
<td>3</td>
<td>8</td>
<td>?</td>
<td>?</td>
<td>0</td>
<td>1</td>
<td>9</td>
</tr>
<tr>
<td>Description</td>
<td>
<table>
<tr>
<td>VT_CF</td>
</tr>
<tr>
<td>Variant Type - Clipbard Format</td>
</tr>
<tr>
<td>VT_CF==17</td>
</tr>
<tr>
<td>Pointer to a CLIPDATA structure</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>Clipboard Size</td>
</tr>
<tr>
<td>cbSize is the size of the buffer pointed to by pClipData, plus sizeof(ulClipFmt)</td>
</tr>
<tr>
<td>cbSize</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>cftag</td>
</tr>
<tr>
<td>Clipboard Format Tag</td>
</tr>
<tr>
<td>
<ul>
<li>-1L a built-in Windows&reg; clipboard format value.</li>
<li>-2L Macintosh clipboard format value.</li>
<li>-3L A GUID containing a format identifier (FMTID).</li>
<li>0L No data (rarely used)</li>
</ul>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>Format ID</td>
</tr>
<tr>
<td>If cftag is -1 then this is a DWord descibring the image format</td>
</tr>
<tr>
<td>
<ul>
<li>3&nbsp;CF_METAFILEPICT (Windows Metafile) (recommended)</li>
<li>8&nbsp;CF_DIB (Device Independent Bitmap)</li>
</ul>
</td>
</tr>
<tr>
<td>
Note: These formats are specific to Clipboard, and
Clipboard-specific headers will follow
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>mm</td>
</tr>
<tr>
<td>Mapping Mode</td>
</tr>
<tr>
<td>
<table border=1>
<tr>
<th align=left>Value</th>
<th align=left>Mapping Mode</th>
</tr>
<tr>
<td>1</td>
<td>Text</td>
</tr>
<tr>
<td>2</td>
<td>Low Metric</td>
</tr>
<tr>
<td>3</td>
<td>High Metric</td>
</tr>
<tr>
<td>4</td>
<td>Low English</td>
</tr>
<tr>
<td>5</td>
<td>High English</td>
</tr>
<tr>
<td>6</td>
<td>Twips</td>
</tr>
<tr>
<td>7</td>
<td>Isotropic</td>
</tr>
<tr>
<td>8</td>
<td>Anisotropic</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
Table from GFF Format Summary
<a href="http://www.wvware.com/caolan/ora-wmf.html">
http://www.wvware.com/caolan/ora-wmf.html
</a>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>Width</td>
</tr>
<tr>
<td>Width of the Metafile</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>Height</td>
</tr>
<tr>
<td>Height of the Metafile</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>Handle</td>
</tr>
<tr>
<td>Handle to the Metafile in Memory</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>FileType</td>
</tr>
<tr>
<td>
<ul>
<li>0=memory</li>
<li>1=disk</li>
</ul>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>HeaderSize </td>
</tr>
<tr>
<td>
HeaderSize contains the size of the metafile header in 16-bit WORDs.
This value is always 9.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Width</td>
<td>DWord</td>
<td>Unsigned Long</td>
<td>DWord (Long)</td>
<td>DWord</td>
<td>Word</td>
<td>Word</td>
<td>Word</td>
<td>Word</td>
<td>Word</td>
<td>Word</td>
</tr>
<!-- Start of Row to describe extent of CLIPDATA -->
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="9">CLIPDATA Struct</td>
</tr>
<!-- End of Row to describe extent of CLIPDATA -->
<!-- Start of Row to describe extend of Clipboard16MetaHeader-->
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="4">Clipboard16MetaHeader</td>
<td colspan="2">WindowsMetaHeader</td>
</tr>
<!-- End of Row to describe extend of Clipboard16MetaHeader-->
</table>
<p>Infomation taken from http://msdn.microsoft.com and http://www.wvware.com/caolan/ora-wmf.html</p>
</body>
</html>