diff --git a/src/documentation/xdocs/hpsf/book.xml b/src/documentation/xdocs/hpsf/book.xml index 2b5cad7d5..529baed75 100644 --- a/src/documentation/xdocs/hpsf/book.xml +++ b/src/documentation/xdocs/hpsf/book.xml @@ -11,6 +11,7 @@ + diff --git a/src/documentation/xdocs/hpsf/how-to.xml b/src/documentation/xdocs/hpsf/how-to.xml index 195e8c78f..bdb49d044 100644 --- a/src/documentation/xdocs/hpsf/how-to.xml +++ b/src/documentation/xdocs/hpsf/how-to.xml @@ -40,6 +40,11 @@ +

Please note that there is separate document on thumbnails!

+ + +
diff --git a/src/documentation/xdocs/hpsf/thumbnail.html b/src/documentation/xdocs/hpsf/thumbnail.html deleted file mode 100644 index bb0264bba..000000000 --- a/src/documentation/xdocs/hpsf/thumbnail.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - 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

- - diff --git a/src/documentation/xdocs/hpsf/thumbnails.xml b/src/documentation/xdocs/hpsf/thumbnails.xml new file mode 100644 index 000000000..5e80945d2 --- /dev/null +++ b/src/documentation/xdocs/hpsf/thumbnails.xml @@ -0,0 +1,176 @@ + + + + + +
+ HPSF THUMBNAIL HOW-TO + + + +
+ +
+ +

+ Thumbnail information is stored as a VT_CF, or Thumbnail Variant. + The Thumbnail Variant is used to store various types of information + in a clipboard. The VT_CF can store information in formats for the + Macintosh or Windows clipboard. +

+ +

+ There are many types of data that can be copied to the clipboard, + but the only types of information needed for thumbnail manipulation are + the image formats. +

+ +

The VT_CF structure looks like this:

+ + + + + + + + + + + + + + +
Element:Clipboard SizeClipboard Format TagClipboard Data
Size:32 bit unsigned integer (DWord)32 bit signed integer (DWord)variable length (byte array)
+ +

+ The Clipboard Size refers to the size (in bytes) of Clipboard Data + (variable size) plus the Clipboard Format (four bytes). +

+ +

Clipboard Format Tag has four possible values:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueIdentifierDescription
-1LCFTAG_WINDOWSa built-in Windows© clipboard format value
-2LCFTAG_MACINTOSHa Macintosh clipboard format value
-3LCFTAG_FMTIDa format identifier (FMTID) This is rarely used.
0LCFTAG_NODATANo data This is rarely used.
+
+ + + +
+ +

+ Windows clipboard data has four image formats for thumbnails: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueIdentifierDescription
3CF_METAFILEPICTWindows metafile format - recommended
8CF_DIBDevice Independent Bitmap
14CF_ENHMETAFILEEnhanced Windows metafile format
2CF_BITMAPBitmap - Obsolete - Use CF_DIB instead
+ +
+ +

+ The most common format for thumbnails on the Windows platform + is the Windows metafile format. The Clipboard places and extra + header in front of a the standard Windows Metafile Format data. +

+ +

+ The Clipboard Data byte array looks like this when an image is + stored in Windows' Clipboard WMF format. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentifierCF_METAFILEPICTmmwidthheighthandleWMF data
Size32 bit unsigned int16 bit unsigned(?) int16 bit unsigned(?) int16 bit unsigned(?) int16 bit unsigned(?) intbyte array - variable length
DescriptionClipboard WMFMapping ModeImage WidthImage Heighthandle to the WMF data array in memory, or 0standard WMF byte stream
+
+ + + +
+

FIXME: Document Device Independent Bitmap format

+
+
+ + + +
+

FIXME: Document Macintosh clipboard formats.

+
+ + +