X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=utilities%2FCxImage%2Fximawbmp.h;h=f52368443ebd0ea4a2b0699809dd6e178153da59;hb=HEAD;hp=8103345b4233f5d6effb8fd9e7caaab2f30ae5b6;hpb=19d5db17f1c0e98cf84a6cb83643404a550a12a4;p=clitk.git diff --git a/utilities/CxImage/ximawbmp.h b/utilities/CxImage/ximawbmp.h index 8103345..f523684 100644 --- a/utilities/CxImage/ximawbmp.h +++ b/utilities/CxImage/ximawbmp.h @@ -1,49 +1,49 @@ -/* - * File: ximawbmp.h - * Purpose: WBMP Image Class Loader and Writer - */ -/* ========================================================== - * CxImageWBMP (c) 12/Jul/2002 Davide Pizzolato - www.xdp.it - * For conditions of distribution and use, see copyright notice in ximage.h - * ========================================================== - */ -#if !defined(__ximaWBMP_h) -#define __ximaWBMP_h - -#include "ximage.h" - -#if CXIMAGE_SUPPORT_WBMP - -class CxImageWBMP: public CxImage -{ -#pragma pack(1) -typedef struct tagWbmpHeader -{ - DWORD Type; // 0 - BYTE FixHeader; // 0 - DWORD ImageWidth; // Image Width - DWORD ImageHeight; // Image Height -} WBMPHEADER; -#pragma pack() -public: - CxImageWBMP(): CxImage(CXIMAGE_FORMAT_WBMP) {} - -// bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_WBMP);} -// bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_WBMP);} - bool Decode(CxFile * hFile); - bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } -protected: - bool ReadOctet(CxFile * hFile, DWORD *data); - -public: -#if CXIMAGE_SUPPORT_ENCODE - bool Encode(CxFile * hFile); - bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } -protected: - bool WriteOctet(CxFile * hFile, const DWORD data); -#endif // CXIMAGE_SUPPORT_ENCODE -}; - -#endif - -#endif +/* + * File: ximawbmp.h + * Purpose: WBMP Image Class Loader and Writer + */ +/* ========================================================== + * CxImageWBMP (c) 12/Jul/2002 Davide Pizzolato - www.xdp.it + * For conditions of distribution and use, see copyright notice in ximage.h + * ========================================================== + */ +#if !defined(__ximaWBMP_h) +#define __ximaWBMP_h + +#include "ximage.h" + +#if CXIMAGE_SUPPORT_WBMP + +class CxImageWBMP: public CxImage +{ +#pragma pack(1) +typedef struct tagWbmpHeader +{ + DWORD Type; // 0 + BYTE FixHeader; // 0 + DWORD ImageWidth; // Image Width + DWORD ImageHeight; // Image Height +} WBMPHEADER; +#pragma pack() +public: + CxImageWBMP(): CxImage(CXIMAGE_FORMAT_WBMP) {} + +// bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_WBMP);} +// bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_WBMP);} + bool Decode(CxFile * hFile); + bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } +protected: + bool ReadOctet(CxFile * hFile, DWORD *data); + +public: +#if CXIMAGE_SUPPORT_ENCODE + bool Encode(CxFile * hFile); + bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } +protected: + bool WriteOctet(CxFile * hFile, const DWORD data); +#endif // CXIMAGE_SUPPORT_ENCODE +}; + +#endif + +#endif