]> Creatis software - clitk.git/blobdiff - utilities/CxImage/ximapcx.h
cosmetic
[clitk.git] / utilities / CxImage / ximapcx.h
index 6e18f1561b1fe844f5b9e34bd1595847f2113884..271992c7fa9df4a1e1b41ae71c998773ac16da64 100644 (file)
@@ -1,64 +1,64 @@
-/*\r
- * File:       ximapcx.h\r
- * Purpose:    PCX Image Class Loader and Writer\r
- */\r
-/* ==========================================================\r
- * CxImagePCX (c) 05/Jan/2002 Davide Pizzolato - www.xdp.it\r
- * For conditions of distribution and use, see copyright notice in ximage.h\r
- *\r
- * Parts of the code come from Paintlib: Copyright (c) 1996-1998 Ulrich von Zadow\r
- * ==========================================================\r
- */\r
-#if !defined(__ximaPCX_h)\r
-#define __ximaPCX_h\r
-\r
-#include "ximage.h"\r
-\r
-#if CXIMAGE_SUPPORT_PCX\r
-\r
-class CxImagePCX: public CxImage\r
-{\r
-// PCX Image File\r
-#pragma pack(1)\r
-typedef struct tagPCXHEADER\r
-{\r
-  char Manufacturer;   // always 0X0A\r
-  char Version;                        // version number\r
-  char Encoding;               // always 1\r
-  char BitsPerPixel;   // color bits\r
-  WORD Xmin, Ymin;             // image origin\r
-  WORD Xmax, Ymax;             // image dimensions\r
-  WORD Hres, Vres;             // resolution values\r
-  BYTE ColorMap[16][3];        // color palette\r
-  char Reserved;\r
-  char ColorPlanes;            // color planes\r
-  WORD BytesPerLine;   // line buffer size\r
-  WORD PaletteType;            // grey or color palette\r
-  char Filter[58];\r
-} PCXHEADER;\r
-#pragma pack()\r
-\r
-public:\r
-       CxImagePCX(): CxImage(CXIMAGE_FORMAT_PCX) {}\r
-\r
-//     bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_PCX);}\r
-//     bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_PCX);}\r
-       bool Decode(CxFile * hFile);\r
-       bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }\r
-\r
-#if CXIMAGE_SUPPORT_ENCODE\r
-       bool Encode(CxFile * hFile);\r
-       bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }\r
-#endif // CXIMAGE_SUPPORT_ENCODE\r
-protected:\r
-       bool PCX_PlanesToPixels(BYTE * pixels, BYTE * bitplanes, short bytesperline, short planes, short bitsperpixel);\r
-       bool PCX_UnpackPixels(BYTE * pixels, BYTE * bitplanes, short bytesperline, short planes, short bitsperpixel);\r
-       void PCX_PackPixels(const long p,BYTE &c, BYTE &n, CxFile &f);\r
-       void PCX_PackPlanes(BYTE* buff, const long size, CxFile &f);\r
-       void PCX_PixelsToPlanes(BYTE* raw, long width, BYTE* buf, long plane);\r
-       void PCX_toh(PCXHEADER* p);\r
-};\r
-\r
-#endif\r
-\r
-#endif\r
+/*
+ * File:       ximapcx.h
+ * Purpose:    PCX Image Class Loader and Writer
+ */
+/* ==========================================================
+ * CxImagePCX (c) 05/Jan/2002 Davide Pizzolato - www.xdp.it
+ * For conditions of distribution and use, see copyright notice in ximage.h
+ *
+ * Parts of the code come from Paintlib: Copyright (c) 1996-1998 Ulrich von Zadow
+ * ==========================================================
+ */
+#if !defined(__ximaPCX_h)
+#define __ximaPCX_h
+
+#include "ximage.h"
+
+#if CXIMAGE_SUPPORT_PCX
+
+class CxImagePCX: public CxImage
+{
+// PCX Image File
+#pragma pack(1)
+typedef struct tagPCXHEADER
+{
+  char Manufacturer;   // always 0X0A
+  char Version;                        // version number
+  char Encoding;               // always 1
+  char BitsPerPixel;   // color bits
+  WORD Xmin, Ymin;             // image origin
+  WORD Xmax, Ymax;             // image dimensions
+  WORD Hres, Vres;             // resolution values
+  BYTE ColorMap[16][3];        // color palette
+  char Reserved;
+  char ColorPlanes;            // color planes
+  WORD BytesPerLine;   // line buffer size
+  WORD PaletteType;            // grey or color palette
+  char Filter[58];
+} PCXHEADER;
+#pragma pack()
+
+public:
+       CxImagePCX(): CxImage(CXIMAGE_FORMAT_PCX) {}
+
+//     bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_PCX);}
+//     bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_PCX);}
+       bool Decode(CxFile * hFile);
+       bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
+
+#if CXIMAGE_SUPPORT_ENCODE
+       bool Encode(CxFile * hFile);
+       bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
+#endif // CXIMAGE_SUPPORT_ENCODE
+protected:
+       bool PCX_PlanesToPixels(BYTE * pixels, BYTE * bitplanes, short bytesperline, short planes, short bitsperpixel);
+       bool PCX_UnpackPixels(BYTE * pixels, BYTE * bitplanes, short bytesperline, short planes, short bitsperpixel);
+       void PCX_PackPixels(const long p,BYTE &c, BYTE &n, CxFile &f);
+       void PCX_PackPlanes(BYTE* buff, const long size, CxFile &f);
+       void PCX_PixelsToPlanes(BYTE* raw, long width, BYTE* buf, long plane);
+       void PCX_toh(PCXHEADER* p);
+};
+
+#endif
+
+#endif