public byte[] getThumbnailAsWMF() throws HPSFException{if (!(getClipboardFormatTag() == CFTAG_WINDOWS))throw new HPSFException("Clipboard Format Tag of Thumbnail must " +"be CFTAG_WINDOWS.");if (!(getClipboardFormat() == CF_METAFILEPICT)) {throw new HPSFException("Clipboard Format of Thumbnail must " +"be CF_METAFILEPICT.");}byte[] thumbnail = getThumbnail();int wmfImageLength = thumbnail.length - OFFSET_WMFDATA;byte[] wmfImage = new byte[wmfImageLength];System.arraycopy(thumbnail,OFFSET_WMFDATA,wmfImage,0,wmfImageLength);return wmfImage;}

public byte [ ] getThumbnailAsWMF ( ) throws HPSFException { if ( ! ( getClipboardFormatTag ( ) == CFTAG_WINDOWS ) ) throw new HPSFException ( "Clipboard Format Tag of Thumbnail must " + "be CFTAG_WINDOWS." ) ; if ( ! ( getClipboardFormat ( ) == CF_METAFILEPICT ) ) { throw new HPSFException ( "Clipboard Format of Thumbnail must " + "be CF_METAFILEPICT." ) ; } byte [ ] thumbnail = getThumbnail ( ) ; int wmfImageLength = thumbnail . length - OFFSET_WMFDATA ; byte [ ] wmfImage = new byte [ wmfImageLength ] ; System . arraycopy ( thumbnail , OFFSET_WMFDATA , wmfImage , 0 , wmfImageLength ) ; return wmfImage ; }
public byte[] GetThumbnailAsWMF(){if (!(ClipboardFormatTag == CFTAG_WINDOWS))throw new HPSFException("Clipboard Format Tag of Thumbnail must " +"be CFTAG_WINDOWS.");if (!(GetClipboardFormat() == CF_METAFILEPICT))throw new HPSFException("Clipboard Format of Thumbnail must " +"be CF_METAFILEPICT.");else{byte[] thumbnail = this.ThumbnailData;int wmfImageLength = thumbnail.Length - OFFSet_WMFDATA;byte[] wmfImage = new byte[wmfImageLength];System.Array.Copy(thumbnail,OFFSet_WMFDATA,wmfImage,0,wmfImageLength);return wmfImage;}}
