From af5dec6108a46ad70aa39b55de2702ac19db026c Mon Sep 17 00:00:00 2001 From: Rainer Klute Date: Mon, 29 Apr 2002 08:20:51 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352552 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/xdocs/hpsf/how-to.xml | 5 +- src/documentation/xdocs/hpsf/thumbnail.html | 294 ++++++++++++++++++++ 2 files changed, 297 insertions(+), 2 deletions(-) create mode 100644 src/documentation/xdocs/hpsf/thumbnail.html diff --git a/src/documentation/xdocs/hpsf/how-to.xml b/src/documentation/xdocs/hpsf/how-to.xml index 337a8e74c3..195e8c78ff 100644 --- a/src/documentation/xdocs/hpsf/how-to.xml +++ b/src/documentation/xdocs/hpsf/how-to.xml @@ -33,9 +33,10 @@
  • -

    The third section tells how to read +

    The third section tells how to read non-standard properties. Non-standard properties are application-specific - name/value/type triples.

    + name/value/type triples. This section is still to be written. Look up + the API documentation for the time being!

  • diff --git a/src/documentation/xdocs/hpsf/thumbnail.html b/src/documentation/xdocs/hpsf/thumbnail.html new file mode 100644 index 0000000000..bb0264bbad --- /dev/null +++ b/src/documentation/xdocs/hpsf/thumbnail.html @@ -0,0 +1,294 @@ + + + + Structure of the byte[] returned by SummaryInformation's + getThumbnailMethod() + + +

    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>Returns the stream's thumbnail (or <code>null</code>)</p> + */ + public byte[] getThumbnail() + { + return (byte[]) getProperty(PropertyIDMap.PID_THUMBNAIL); + } +

    + +

    Assumptions:

    + + +

    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)

    + +
    Drew Varner, Drew.Varner -at- sc.edu
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     byte[] returned by SummaryInformation.getThumbnail()
    Sample Data7120660-138??019
    Description + + + + + + + + + + + + + +
    VT_CF
    Variant Type - Clipbard Format
    VT_CF==17
    Pointer to a CLIPDATA structure
    +
    + + + + + + + + + + +
    Clipboard Size
    cbSize is the size of the buffer pointed to by pClipData, plus sizeof(ulClipFmt)
    cbSize
    +
    + + + + + + + + + + +
    cftag
    Clipboard Format Tag
    +
      +
    • -1L a built-in Windows® clipboard format value.
    • +
    • -2L Macintosh clipboard format value.
    • +
    • -3L A GUID containing a format identifier (FMTID).
    • +
    • 0L No data (rarely used)
    • +
    +
    +
    + + + + + + + + + + + + + +
    Format ID
    If cftag is -1 then this is a DWord descibring the image format
    +
      +
    • 3 CF_METAFILEPICT (Windows Metafile) (recommended)
    • +
    • 8 CF_DIB (Device Independent Bitmap)
    • +
    +
    + Note: These formats are specific to Clipboard, and + Clipboard-specific headers will follow +
    +
    + + + + + + + + + + + + + +
    mm
    Mapping Mode
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueMapping Mode
    1Text
    2Low Metric
    3High Metric
    4Low English
    5High English
    6Twips
    7Isotropic
    8Anisotropic
    +
    + Table from GFF Format Summary + + http://www.wvware.com/caolan/ora-wmf.html + +
    +
    + + + + + + + +
    Width
    Width of the Metafile
    +
    + + + + + + + +
    Height
    Height of the Metafile
    +
    + + + + + + + +
    Handle
    Handle to the Metafile in Memory
    +
    + + + + + + + +
    FileType
    +
      +
    • 0=memory
    • +
    • 1=disk
    • +
    +
    +
    + + + + + + + +
    HeaderSize
    + HeaderSize contains the size of the metafile header in 16-bit WORDs. + This value is always 9. +
    +
    WidthDWordUnsigned LongDWord (Long)DWordWordWordWordWordWordWord
      CLIPDATA Struct
         Clipboard16MetaHeaderWindowsMetaHeader
    +

    Infomation taken from http://msdn.microsoft.com and http://www.wvware.com/caolan/ora-wmf.html

    + + -- 2.39.5