/* /-------------------------------------------------------------------- | | $Id: testpsddecoder.cpp,v 1.13 2004/09/11 12:41:36 uzadow Exp $ | | Copyright (c) 1996-2002 Ulrich von Zadow | \-------------------------------------------------------------------- */ #include "testpsddecoder.h" #include "pltester.h" #include "plpsddec.h" #include "planybmp.h" #include "plpngenc.h" #include #include using namespace std; PLTestPSDDecoder::PLTestPSDDecoder () { } PLTestPSDDecoder::~PLTestPSDDecoder () { } void PLTestPSDDecoder::RunTests () { test (string ("rgb8.psd")); test (string ("rgb8alpha.psd")); test (string ("rgb24.psd")); test (string ("rgb24alpha.psd")); test (string ("rgb24alpha2.psd")); test (string ("rgb24layers.psd")); } void PLTestPSDDecoder::test (const string& sFName) { PLPSDDecoder Decoder; PLAnyBmp Bmp; string sFilePos = PLTester::m_sTestFileDir+sFName; cerr << " Testing " << sFilePos << "...\n"; cerr << " Testing MakeBmpFromFile...\n"; Decoder.MakeBmpFromFile (sFilePos.c_str(), &Bmp); { PLPSDDecoder Decoder; // PLPNGEncoder Encoder; cerr << " Testing OpenFile...\n"; Decoder.OpenFile (sFilePos.c_str()); int n = Decoder.GetNumLayers (); for (int i = 0; i