00001 #include <sstream>
00002
00003 #include "NOPackage.h"
00004 #include "NOPage.h"
00005
00006 using namespace NiXPSObjects;
00007
00008 void extractImage(const UTF8Char *pXPSIn, const UTF8Char *pImageOut)
00009 {
00010 NOPackage *baseDoc = NOPackage::readPackageFromFile(pXPSIn);
00011
00012
00013 NOPage basePage = baseDoc->getDocument(0).getPage(1);
00014
00015 NOImageVector lImages(*baseDoc);
00016 basePage.getImages(lImages);
00017
00018
00019 NOImage lImage = lImages[1];
00020 lImage.writeImageToFile(pImageOut);
00021
00022 NOPackage::destroyPackage(baseDoc);
00023 }