00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: pltester_8h-source.html,v 1.4 2004/09/15 15:26:32 uzadow Exp $ 00005 | 00006 | Copyright (c) 1996-2002 Ulrich von Zadow 00007 | 00008 \-------------------------------------------------------------------- 00009 */ 00010 00011 #ifndef INCL_PLTESTER 00012 #define INCL_PLTESTER 00013 00014 #include "pltest.h" 00015 #include "config.h" 00016 00017 #ifdef _WINDOWS 00018 #include <windows.h> 00019 #else 00020 #include "plpaintlibdefs.h" 00021 #endif 00022 00023 #include "plbitmap.h" 00024 #include "planybmp.h" 00025 00026 #ifdef _WINDOWS 00027 #include "pldibsect.h" 00028 // #include "plddrawbmp.h" 00029 #endif 00030 00031 #include "plpicenc.h" 00032 #include "plpicdec.h" 00033 00034 #include <string> 00035 00036 class PLFilter; 00037 00038 class PLTester: public PLTest 00039 { 00040 00041 public: 00042 PLTester (); 00043 00044 virtual ~PLTester(); 00045 00046 virtual void RunTests (); 00047 00048 static const std::string m_sTestFileDir; 00049 static const std::string m_sTestFileList; 00050 00051 private: 00052 void testBmpInfo (PLBmpInfo& BmpInfo); 00053 void testBmpBase(PLBmpBase& Bmp); 00054 void testPLBmp (PLBmp& Bmp); 00055 #ifdef _WINDOWS 00056 void testPLWinBmp (PLWinBmp& Bmp); 00057 void testLoadRes (); 00058 void testDIBSect (PLDIBSection& Bmp); 00059 #endif 00060 void testPixels (); 00061 void testPoint (); 00062 void testRect (); 00063 00064 void testCodec (const PLPicEncoder& Encoder, const PLPicDecoder& Decoder); 00065 void testCodecBmp (PLBmp& Bmp, const PLPicEncoder& Encoder, 00066 const PLPicDecoder& Decoder, char * pszFName); 00067 #ifdef PL_SUPPORT_TIFF 00068 void testCTIFFEx (PLBmp& Bmp); 00069 #endif 00070 00071 void setUpBmp (PLBmp& Bmp, const PLPixelFormat & pf); 00072 void setUp (); 00073 void tearDown (); 00074 void dumpBmp (PLBmp& bmp); 00075 bool almostEqual (PLBmp& bmp1, PLBmp& bmp2, int epsilon); 00076 00077 PLAnyBmp m_AnyBmp8; 00078 PLAnyBmp m_AnyBmp16; 00079 PLAnyBmp m_AnyBmp24; 00080 PLAnyBmp m_AnyBmp32; 00081 00082 #ifdef _WINDOWS 00083 PLDIBSection m_DIBSect8; 00084 PLDIBSection m_DIBSect32; 00085 #endif 00086 00087 }; 00088 00089 #endif 00090 /* 00091 /-------------------------------------------------------------------- 00092 | 00093 | $Log: pltester_8h-source.html,v $ 00093 | Revision 1.4 2004/09/15 15:26:32 uzadow 00093 | Linux compatibility changes, doc update. 00093 | 00094 | Revision 1.30 2004/09/11 10:30:40 uzadow 00095 | Linux build fixes, automake dependency fixes. 00096 | 00097 | Revision 1.29 2004/09/09 16:52:50 artcom 00098 | refactored PixelFormat 00099 | 00100 | Revision 1.28 2004/06/15 14:17:25 uzadow 00101 | First working version of PLSubBmp. 00102 | 00103 | Revision 1.27 2004/06/09 20:27:52 uzadow 00104 | Added 16 bpp pixel class. 00105 | 00106 | Revision 1.26 2004/04/15 19:09:38 uzadow 00107 | - Moved TestBmpList to test source, where it is versioned. 00108 | - All test output goes to cerr now. 00109 | 00110 | Revision 1.25 2003/07/27 13:50:49 uzadow 00111 | Added support for DirectFB surfaces. 00112 | 00113 | Revision 1.24 2003/04/13 21:51:43 uzadow 00114 | Added exif loading - windows ver. 00115 | 00116 | Revision 1.23 2003/03/08 15:16:02 uzadow 00117 | Added PLSDLBmp::Attach(). 00118 | 00119 | Revision 1.22 2003/03/08 14:32:20 uzadow 00120 | Added support for bitmaps in SDL surface format. 00121 | 00122 | Revision 1.21 2002/11/27 22:32:24 uzadow 00123 | Now works if TIFF, PNG and/or JPEG support are not available 00124 | 00125 | Revision 1.20 2002/08/04 20:08:01 uzadow 00126 | Added PLBmpInfo class, ability to extract metainformation from images without loading the whole image and proper greyscale support. 00127 | 00128 | Revision 1.19 2002/02/24 13:00:49 uzadow 00129 | Documentation update; removed buggy PLFilterRotate. 00130 | 00131 | Revision 1.18 2001/10/06 20:44:45 uzadow 00132 | Linux compatibility 00133 | 00134 | Revision 1.17 2001/10/03 14:00:29 uzadow 00135 | Much improved quality in FilterResizeBilinear. 00136 | 00137 | Revision 1.16 2001/09/30 19:55:37 uzadow 00138 | Fixed bug for 8 bpp in PLFilterCrop. 00139 | 00140 | Revision 1.15 2001/09/28 19:50:56 uzadow 00141 | Added some 24 bpp stuff & other minor features. 00142 | 00143 | Revision 1.14 2001/09/24 14:19:19 uzadow 00144 | Added PLPoint & PLRect tests. 00145 | 00146 | Revision 1.13 2001/09/16 20:57:17 uzadow 00147 | Linux version name prefix changes 00148 | 00149 | Revision 1.12 2001/09/16 19:03:23 uzadow 00150 | Added global name prefix PL, changed most filenames. 00151 | 00152 | Revision 1.11 2001/09/15 14:30:20 uzadow 00153 | Fixed PLPixel32 initialization bug. 00154 | 00155 | Revision 1.10 2001/09/13 20:49:31 uzadow 00156 | Added fill filters. 00157 | 00158 | Revision 1.9 2001/01/15 15:05:31 uzadow 00159 | Added PLBmp::ApplyFilter() and PLBmp::CreateFilteredCopy() 00160 | 00161 | Revision 1.8 2001/01/13 20:06:16 uzadow 00162 | Added Flip and Mirror filters. 00163 | 00164 | Revision 1.7 2000/12/18 22:42:53 uzadow 00165 | Replaced RGBAPIXEL with PLPixel32. 00166 | 00167 | Revision 1.6 2000/12/09 12:16:26 uzadow 00168 | Fixed several memory leaks. 00169 | 00170 | Revision 1.5 2000/12/04 23:59:02 uzadow 00171 | Added filter tests. 00172 | 00173 | Revision 1.4 2000/12/03 21:15:43 uzadow 00174 | Fixed png handling in configure; test/ adapted to linux 00175 | 00176 | Revision 1.3 2000/12/02 19:42:30 uzadow 00177 | Added PLTIFFEncoderEx test. 00178 | 00179 | Revision 1.2 2000/11/21 23:28:53 uzadow 00180 | Moved PLBmp tests from testdec to test. 00181 | 00182 | Revision 1.1 2000/11/21 20:29:39 uzadow 00183 | Added test project. 00184 | 00185 | 00186 \-------------------------------------------------------------------- 00187 */