docexample_getthumbnail.cpp

00001 #include "NOPackage.h"
00002 #include "NOThumbnail.h"
00003 
00004 using namespace NiXPSObjects;
00005 
00006 void getThumbnail()
00007 {
00008         NOPackage *lPackageSource=NOPackage::readPackageFromFile("CoreProperty2.xps");  
00009         
00010         if (lPackageSource->hasThumbnail())
00011         {
00012                 NOThumbnail lThumb = lPackageSource->getThumbnail();    
00013                 const UInt32 lSize = lThumb.getImageSize();
00014                 UInt8 *lBuffer = new UInt8[lSize];
00015                 lThumb.getImageData(lBuffer,lSize);
00016                 for (UInt32 lCount=0; lCount<lSize; lCount++)
00017                 {
00018                         // do something with lBuffer[lCount];
00019                 }
00020                 delete [] lBuffer;
00021         }
00022 
00023         NOPackage::destroyPackage(lPackageSource);
00024 }

Generated on Thu Jul 19 09:33:08 2007 for NiXPS Library by  doxygen 1.5.2