ReactOS  0.4.15-dev-1068-g467feb9
ATL::CImage Class Reference

#include <atlimage.h>

Collaboration diagram for ATL::CImage:

Classes

struct  COMMON
 
struct  EXTENSION_ENTRY
 
struct  FILTER_DATA
 
struct  FORMAT_ENTRY
 
struct  MYBITMAPINFOEX
 

Public Types

enum  { createAlphaChannel = 1 }
 
enum  DIBOrientation { DIBOR_DEFAULT, DIBOR_BOTTOMUP, DIBOR_TOPDOWN }
 
enum  ExcludeFlags {
  excludeGIF = 0x01, excludeBMP = 0x02, excludeEMF = 0x04, excludeWMF = 0x08,
  excludeJPEG = 0x10, excludePNG = 0x20, excludeTIFF = 0x40, excludeIcon = 0x80,
  excludeOther = 0x80000000, excludeDefaultLoad = 0, excludeDefaultSave = excludeIcon | excludeEMF | excludeWMF
}
 

Public Member Functions

 CImage () throw ()
 
 ~CImage ()
 
 operator HBITMAP ()
 
void Attach (HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT)
 
HBITMAP Detach () throw ()
 
HDC GetDC () const throw ()
 
void ReleaseDC () const throw ()
 
BOOL AlphaBlend (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
 
BOOL AlphaBlend (HDC hDestDC, int xDest, int yDest, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
 
BOOL AlphaBlend (HDC hDestDC, const POINT &pointDest, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
 
BOOL AlphaBlend (HDC hDestDC, const RECT &rectDest, const RECT &rectSrc, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
 
BOOL BitBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL BitBlt (HDC hDestDC, int xDest, int yDest, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL BitBlt (HDC hDestDC, const POINT &pointDest, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL BitBlt (HDC hDestDC, const RECT &rectDest, const POINT &pointSrc, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL Create (int nWidth, int nHeight, int nBPP, DWORD dwFlags=0) throw ()
 
BOOL CreateEx (int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0) throw ()
 
void Destroy () throw ()
 
BOOL Draw (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const throw ()
 
BOOL Draw (HDC hDestDC, const RECT &rectDest, const RECT &rectSrc) const throw ()
 
BOOL Draw (HDC hDestDC, int xDest, int yDest) const throw ()
 
BOOL Draw (HDC hDestDC, const POINT &pointDest) const throw ()
 
BOOL Draw (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight) const throw ()
 
BOOL Draw (HDC hDestDC, const RECT &rectDest) const throw ()
 
voidGetBits () throw ()
 
int GetBPP () const throw ()
 
void GetColorTable (UINT iFirstColor, UINT nColors, RGBQUAD *prgbColors) const throw ()
 
int GetHeight () const throw ()
 
int GetMaxColorTableEntries () const throw ()
 
int GetPitch () const throw ()
 
COLORREF GetPixel (int x, int y) const throw ()
 
voidGetPixelAddress (int x, int y) throw ()
 
COLORREF GetTransparentColor () const throw ()
 
int GetWidth () const throw ()
 
bool IsDIBSection () const throw ()
 
bool IsIndexed () const throw ()
 
bool IsNull () const throw ()
 
HRESULT Load (LPCTSTR pszFileName) throw ()
 
HRESULT Load (IStream *pStream) throw ()
 
void LoadFromResource (HINSTANCE hInstance, LPCTSTR pszResourceName) throw ()
 
void LoadFromResource (HINSTANCE hInstance, UINT nIDResource) throw ()
 
BOOL MaskBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL MaskBlt (HDC hDestDC, const RECT &rectDest, const POINT &pointSrc, HBITMAP hbmMask, const POINT &pointMask, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL MaskBlt (HDC hDestDC, int xDest, int yDest, HBITMAP hbmMask, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL MaskBlt (HDC hDestDC, const POINT &pointDest, HBITMAP hbmMask, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL PlgBlt (HDC hDestDC, const POINT *pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask=NULL, int xMask=0, int yMask=0) const throw ()
 
BOOL PlgBlt (HDC hDestDC, const POINT *pPoints, HBITMAP hbmMask=NULL) const throw ()
 
BOOL PlgBlt (HDC hDestDC, const POINT *pPoints, const RECT &rectSrc, HBITMAP hbmMask, const POINT &pointMask) const throw ()
 
BOOL PlgBlt (HDC hDestDC, const POINT *pPoints, const RECT &rectSrc, HBITMAP hbmMask=NULL) const throw ()
 
void ReleaseGDIPlus () throw ()
 
HRESULT Save (IStream *pStream, GUID *guidFileType) const throw ()
 
HRESULT Save (LPCTSTR pszFileName, REFGUID guidFileType=GUID_NULL) const throw ()
 
void SetColorTable (UINT iFirstColor, UINT nColors, const RGBQUAD *prgbColors) throw ()
 
void SetPixel (int x, int y, COLORREF color) throw ()
 
void SetPixelIndexed (int x, int y, int iIndex) throw ()
 
void SetPixelRGB (int x, int y, BYTE r, BYTE g, BYTE b) throw ()
 
COLORREF SetTransparentColor (COLORREF rgbTransparent) throw ()
 
BOOL StretchBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL StretchBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL StretchBlt (HDC hDestDC, const RECT &rectDest, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL StretchBlt (HDC hDestDC, const RECT &rectDest, const RECT &rectSrc, DWORD dwROP=SRCCOPY) const throw ()
 
BOOL TransparentBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const throw ()
 
BOOL TransparentBlt (HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, UINT crTransparent=CLR_INVALID) const throw ()
 
BOOL TransparentBlt (HDC hDestDC, const RECT &rectDest, UINT crTransparent=CLR_INVALID) const throw ()
 
BOOL TransparentBlt (HDC hDestDC, const RECT &rectDest, const RECT &rectSrc, UINT crTransparent=CLR_INVALID) const throw ()
 

Static Public Member Functions

static BOOL IsTransparencySupported () throw ()
 
static HRESULT GetImporterFilterString (CSimpleString &strImporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultLoad, TCHAR chSeparator=TEXT('|'))
 
static HRESULT GetExporterFilterString (CSimpleString &strExporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultSave, TCHAR chSeparator=TEXT('|'))
 

Protected Member Functions

LPCWSTR GetFileExtension (LPCWSTR pszFileName) const
 
COLORREF RGBFromPaletteIndex (int iIndex) const
 
const GUIDFileTypeFromExtension (LPCWSTR pszExt) const
 
bool GetClsidFromFileType (CLSID *clsid, const GUID *guid) const
 
int GetEncoderClsid (LPCWSTR mime, CLSID *clsid) const
 
bool IsGuidEqual (const GUID &guid1, const GUID &guid2) const
 
void AttachInternal (HBITMAP hBitmap, DIBOrientation eOrientation, LONG iTransColor)
 
BOOL CreateInternal (int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0) throw ()
 

Static Protected Member Functions

static HRESULT GetCommonFilterString (CSimpleString &strFilter, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription, DWORD dwExclude, TCHAR chSeparator)
 
static COMMON *& GetCommonPtr ()
 
static COMMONGetCommon ()
 

Protected Attributes

HBITMAP m_hbm
 
HGDIOBJ m_hbmOld
 
HDC m_hDC
 
DIBOrientation m_eOrientation
 
bool m_bHasAlphaCh
 
bool m_bIsDIBSec
 
COLORREF m_rgbTransColor
 
union {
   BITMAP   m_bm
 
   DIBSECTION   m_ds
 
}; 
 

Private Member Functions

 CImage (const CImage &)
 
CImageoperator= (const CImage &)
 

Detailed Description

Definition at line 32 of file atlimage.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
createAlphaChannel 

Definition at line 36 of file atlimage.h.

37  {
38  createAlphaChannel = 1 // enable alpha
39  };

◆ DIBOrientation

Enumerator
DIBOR_DEFAULT 
DIBOR_BOTTOMUP 
DIBOR_TOPDOWN 

Definition at line 42 of file atlimage.h.

43  {
44  DIBOR_DEFAULT, // default
45  DIBOR_BOTTOMUP, // bottom-up DIB
46  DIBOR_TOPDOWN // top-down DIB
47  };

◆ ExcludeFlags

Enumerator
excludeGIF 
excludeBMP 
excludeEMF 
excludeWMF 
excludeJPEG 
excludePNG 
excludeTIFF 
excludeIcon 
excludeOther 
excludeDefaultLoad 
excludeDefaultSave 

Definition at line 697 of file atlimage.h.

Constructor & Destructor Documentation

◆ CImage() [1/2]

ATL::CImage::CImage ( )
throw (
)
inline

Definition at line 49 of file atlimage.h.

50  {
51  m_hbm = NULL;
52  m_hbmOld = NULL;
53  m_hDC = NULL;
54 
56  m_bHasAlphaCh = false;
57  m_bIsDIBSec = false;
59  ZeroMemory(&m_ds, sizeof(m_ds));
60 
61  if (GetCommon().AddRef() == 1)
62  {
63  GetCommon().LoadLib();
64  }
65  }
#define CLR_INVALID
Definition: wingdi.h:882
#define ZeroMemory
Definition: winbase.h:1648
smooth NULL
Definition: ftsmooth.c:416
COLORREF m_rgbTransColor
Definition: atlimage.h:996
HBITMAP m_hbm
Definition: atlimage.h:990
bool m_bIsDIBSec
Definition: atlimage.h:995
static COMMON & GetCommon()
Definition: atlimage.h:981
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
DIBSECTION m_ds
Definition: atlimage.h:1000
DIBOrientation m_eOrientation
Definition: atlimage.h:993
HGDIOBJ m_hbmOld
Definition: atlimage.h:991
bool m_bHasAlphaCh
Definition: atlimage.h:994
HINSTANCE LoadLib()
Definition: atlimage.h:918

◆ ~CImage()

ATL::CImage::~CImage ( )
inline

Definition at line 67 of file atlimage.h.

68  {
69  Destroy();
71  }
void ReleaseGDIPlus()
Definition: atlimage.h:509
void Destroy()
Definition: atlimage.h:208

◆ CImage() [2/2]

ATL::CImage::CImage ( const CImage )
private

Member Function Documentation

◆ AlphaBlend() [1/4]

BOOL ATL::CImage::AlphaBlend ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
BYTE  bSrcAlpha = 0xFF,
BYTE  bBlendOp = AC_SRC_OVER 
) const
inline

Definition at line 123 of file atlimage.h.

127  {
129 
130  BLENDFUNCTION bf;
131  bf.BlendOp = bBlendOp;
132  bf.BlendFlags = 0;
133  bf.SourceConstantAlpha = bSrcAlpha;
135 
136  GetDC();
137  BOOL ret = ::AlphaBlend(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
138  m_hDC, xSrc, ySrc, nSrcWidth, nSrcHeight, bf);
139  ReleaseDC();
140  return ret;
141  }
BOOL AlphaBlend(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
Definition: atlimage.h:123
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define AC_SRC_ALPHA
Definition: alphablend.c:9
BYTE BlendOp
Definition: wingdi.h:2758
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
BYTE SourceConstantAlpha
Definition: wingdi.h:2760
static BOOL IsTransparencySupported()
Definition: atlimage.h:692
int ret
BYTE BlendFlags
Definition: wingdi.h:2759
HDC GetDC() const
Definition: atlimage.h:96
BYTE AlphaFormat
Definition: wingdi.h:2761

Referenced by AlphaBlend(), and Draw().

◆ AlphaBlend() [2/4]

BOOL ATL::CImage::AlphaBlend ( HDC  hDestDC,
int  xDest,
int  yDest,
BYTE  bSrcAlpha = 0xFF,
BYTE  bBlendOp = AC_SRC_OVER 
) const
inline

Definition at line 142 of file atlimage.h.

144  {
145  int width = GetWidth();
146  int height = GetHeight();
147  return AlphaBlend(hDestDC, xDest, yDest, width, height, 0, 0,
148  width, height, bSrcAlpha, bBlendOp);
149  }
GLint GLint GLsizei width
Definition: gl.h:1546
BOOL AlphaBlend(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
Definition: atlimage.h:123
int GetWidth() const
Definition: atlimage.h:354
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
int GetHeight() const
Definition: atlimage.h:297

◆ AlphaBlend() [3/4]

BOOL ATL::CImage::AlphaBlend ( HDC  hDestDC,
const POINT pointDest,
BYTE  bSrcAlpha = 0xFF,
BYTE  bBlendOp = AC_SRC_OVER 
) const
inline

Definition at line 150 of file atlimage.h.

152  {
153  return AlphaBlend(hDestDC, pointDest.x, pointDest.y, bSrcAlpha, bBlendOp);
154  }
BOOL AlphaBlend(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
Definition: atlimage.h:123
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48

◆ AlphaBlend() [4/4]

BOOL ATL::CImage::AlphaBlend ( HDC  hDestDC,
const RECT rectDest,
const RECT rectSrc,
BYTE  bSrcAlpha = 0xFF,
BYTE  bBlendOp = AC_SRC_OVER 
) const
inline

Definition at line 155 of file atlimage.h.

157  {
158  return AlphaBlend(hDestDC, rectDest.left, rectDest.top,
159  rectDest.right - rectDest.left,
160  rectDest.bottom - rectDest.top,
161  rectSrc.left, rectSrc.top,
162  rectSrc.right - rectSrc.left,
163  rectSrc.bottom - rectSrc.top,
164  bSrcAlpha, bBlendOp);
165  }
BOOL AlphaBlend(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
Definition: atlimage.h:123
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

◆ Attach()

void ATL::CImage::Attach ( HBITMAP  hBitmap,
DIBOrientation  eOrientation = DIBOR_DEFAULT 
)
inline

Definition at line 79 of file atlimage.h.

80  {
81  AttachInternal(hBitmap, eOrientation, -1);
82  }
void AttachInternal(HBITMAP hBitmap, DIBOrientation eOrientation, LONG iTransColor)
Definition: atlimage.h:1124
static HBITMAP hBitmap
Definition: timezone.c:26

Referenced by Load(), and LoadFromResource().

◆ AttachInternal()

void ATL::CImage::AttachInternal ( HBITMAP  hBitmap,
DIBOrientation  eOrientation,
LONG  iTransColor 
)
inlineprotected

Definition at line 1124 of file atlimage.h.

1126  {
1127  Destroy();
1128 
1129  const int size = sizeof(DIBSECTION);
1131 
1132  bool bOK = (::GetObject(hBitmap, sizeof(BITMAP), &m_bm) != 0);
1133 
1134  if (bOK)
1135  {
1136  m_hbm = hBitmap;
1137  m_eOrientation = eOrientation;
1138  m_bHasAlphaCh = (m_bm.bmBitsPixel == 32);
1140  }
1141  }
#define CLR_INVALID
Definition: wingdi.h:882
COLORREF m_rgbTransColor
Definition: atlimage.h:996
GLsizeiptr size
Definition: glext.h:5919
HBITMAP m_hbm
Definition: atlimage.h:990
bool m_bIsDIBSec
Definition: atlimage.h:995
#define GetObject
Definition: wingdi.h:4467
BITMAP m_bm
Definition: atlimage.h:999
Definition: bl.h:1331
DIBSECTION m_ds
Definition: atlimage.h:1000
DIBOrientation m_eOrientation
Definition: atlimage.h:993
bool m_bHasAlphaCh
Definition: atlimage.h:994
struct tagDIBSECTION DIBSECTION
void Destroy()
Definition: atlimage.h:208
static HBITMAP hBitmap
Definition: timezone.c:26

Referenced by Attach(), and CreateInternal().

◆ BitBlt() [1/4]

BOOL ATL::CImage::BitBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 167 of file atlimage.h.

170  {
171  GetDC();
172  BOOL ret = ::BitBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
173  m_hDC, xSrc, ySrc, dwROP);
174  ReleaseDC();
175  return ret;
176  }
BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:167
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
int ret
HDC GetDC() const
Definition: atlimage.h:96

Referenced by BitBlt().

◆ BitBlt() [2/4]

BOOL ATL::CImage::BitBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 177 of file atlimage.h.

179  {
180  return BitBlt(hDestDC, xDest, yDest,
181  GetWidth(), GetHeight(), 0, 0, dwROP);
182  }
BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:167
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297

◆ BitBlt() [3/4]

BOOL ATL::CImage::BitBlt ( HDC  hDestDC,
const POINT pointDest,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 183 of file atlimage.h.

185  {
186  return BitBlt(hDestDC, pointDest.x, pointDest.y, dwROP);
187  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:167

◆ BitBlt() [4/4]

BOOL ATL::CImage::BitBlt ( HDC  hDestDC,
const RECT rectDest,
const POINT pointSrc,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 188 of file atlimage.h.

190  {
191  return BitBlt(hDestDC, rectDest.left, rectDest.top,
192  rectDest.right - rectDest.left,
193  rectDest.bottom - rectDest.top,
194  pointSrc.x, pointSrc.y, dwROP);
195  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:167
LONG bottom
Definition: windef.h:309

◆ Create()

BOOL ATL::CImage::Create ( int  nWidth,
int  nHeight,
int  nBPP,
DWORD  dwFlags = 0 
)
throw (
)
inline

Definition at line 197 of file atlimage.h.

198  {
199  return CreateEx(nWidth, nHeight, nBPP, BI_RGB, NULL, dwFlags);
200  }
BOOL CreateEx(int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0)
Definition: atlimage.h:202
smooth NULL
Definition: ftsmooth.c:416
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define BI_RGB
Definition: precomp.h:47

◆ CreateEx()

BOOL ATL::CImage::CreateEx ( int  nWidth,
int  nHeight,
int  nBPP,
DWORD  eCompression,
const DWORD pdwBitmasks = NULL,
DWORD  dwFlags = 0 
)
throw (
)
inline

Definition at line 202 of file atlimage.h.

204  {
205  return CreateInternal(nWidth, nHeight, nBPP, eCompression, pdwBitmasks, dwFlags);
206  }
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BOOL CreateInternal(int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0)
Definition: atlimage.h:1143

Referenced by Create().

◆ CreateInternal()

BOOL ATL::CImage::CreateInternal ( int  nWidth,
int  nHeight,
int  nBPP,
DWORD  eCompression,
const DWORD pdwBitmasks = NULL,
DWORD  dwFlags = 0 
)
throw (
)
inlineprotected

Definition at line 1143 of file atlimage.h.

1146  {
1147  ATLASSERT(nWidth != 0);
1148  ATLASSERT(nHeight != 0);
1149 
1150  // initialize BITMAPINFO extension
1151  MYBITMAPINFOEX bi;
1152  ZeroMemory(&bi, sizeof(bi));
1153  bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
1154  bi.bmiHeader.biWidth = nWidth;
1155  bi.bmiHeader.biHeight = nHeight;
1156  bi.bmiHeader.biPlanes = 1;
1157  bi.bmiHeader.biBitCount = nBPP;
1158  bi.bmiHeader.biCompression = eCompression;
1159 
1160  // is there alpha channel?
1161  bool bHasAlphaCh;
1162  bHasAlphaCh = (nBPP == 32 && (dwFlags & createAlphaChannel));
1163 
1164  // get orientation
1165  DIBOrientation eOrientation;
1166  eOrientation = ((nHeight > 0) ? DIBOR_BOTTOMUP : DIBOR_TOPDOWN);
1167 
1168  // does it have bit fields?
1169  if (eCompression == BI_BITFIELDS)
1170  {
1171  if (nBPP == 16 || nBPP == 32)
1172  {
1173  // store the mask data
1174  LPDWORD pdwMask = reinterpret_cast<LPDWORD>(bi.bmiColors);
1175  pdwMask[0] = pdwBitmasks[0];
1176  pdwMask[1] = pdwBitmasks[1];
1177  pdwMask[2] = pdwBitmasks[2];
1178  }
1179  else
1180  {
1181  return FALSE;
1182  }
1183  }
1184  else
1185  {
1186  ATLASSERT(pdwBitmasks == NULL);
1187  if (pdwBitmasks)
1188  return FALSE;
1189  }
1190 
1191  // create a DIB section
1193  ATLASSERT(hDC);
1194  LPVOID pvBits;
1196  &pvBits, NULL, 0);
1197  ATLASSERT(hbm);
1198  ::DeleteDC(hDC);
1199 
1200  // attach it
1201  AttachInternal(hbm, eOrientation, -1);
1202  m_bHasAlphaCh = bHasAlphaCh;
1203 
1204  return hbm != NULL;
1205  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
static HDC
Definition: imagelist.c:92
#define ZeroMemory
Definition: winbase.h:1648
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define BI_BITFIELDS
Definition: mmreg.h:507
void AttachInternal(HBITMAP hBitmap, DIBOrientation eOrientation, LONG iTransColor)
Definition: atlimage.h:1124
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI DeleteDC(_In_ HDC)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:197
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
uint32_t * LPDWORD
Definition: typedefs.h:59
static HBITMAP
Definition: button.c:44
bool m_bHasAlphaCh
Definition: atlimage.h:994
#define DIB_RGB_COLORS
Definition: wingdi.h:366

Referenced by CreateEx().

◆ Destroy()

void ATL::CImage::Destroy ( )
throw (
)
inline

Definition at line 208 of file atlimage.h.

209  {
210  if (m_hbm)
211  {
213  }
214  }
HBITMAP Detach()
Definition: atlimage.h:84
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HBITMAP m_hbm
Definition: atlimage.h:990

Referenced by AttachInternal(), START_TEST(), and ~CImage().

◆ Detach()

HBITMAP ATL::CImage::Detach ( )
throw (
)
inline

Definition at line 84 of file atlimage.h.

85  {
87  m_bHasAlphaCh = false;
89  ZeroMemory(&m_ds, sizeof(m_ds));
90 
92  m_hbm = NULL;
93  return hBitmap;
94  }
#define CLR_INVALID
Definition: wingdi.h:882
#define ZeroMemory
Definition: winbase.h:1648
smooth NULL
Definition: ftsmooth.c:416
COLORREF m_rgbTransColor
Definition: atlimage.h:996
HBITMAP m_hbm
Definition: atlimage.h:990
DIBSECTION m_ds
Definition: atlimage.h:1000
DIBOrientation m_eOrientation
Definition: atlimage.h:993
static HBITMAP
Definition: button.c:44
bool m_bHasAlphaCh
Definition: atlimage.h:994
static HBITMAP hBitmap
Definition: timezone.c:26

Referenced by Destroy().

◆ Draw() [1/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight 
) const
throw (
)
inline

Definition at line 216 of file atlimage.h.

218  {
220  if (m_bHasAlphaCh)
221  {
222  return AlphaBlend(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
223  xSrc, ySrc, nSrcWidth, nSrcHeight);
224  }
225  else if (m_rgbTransColor != CLR_INVALID)
226  {
227  COLORREF rgb;
228  if ((m_rgbTransColor & 0xFF000000) == 0x01000000)
230  else
232  return TransparentBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
233  xSrc, ySrc, nSrcWidth, nSrcHeight, rgb);
234  }
235  else
236  {
237  return StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
238  xSrc, ySrc, nSrcWidth, nSrcHeight);
239  }
240  }
BOOL AlphaBlend(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, BYTE bSrcAlpha=0xFF, BYTE bBlendOp=AC_SRC_OVER) const
Definition: atlimage.h:123
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:617
#define CLR_INVALID
Definition: wingdi.h:882
BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const
Definition: atlimage.h:653
COLORREF m_rgbTransColor
Definition: atlimage.h:996
COLORREF RGBFromPaletteIndex(int iIndex) const
Definition: atlimage.h:1012
DWORD COLORREF
Definition: windef.h:300
static BOOL IsTransparencySupported()
Definition: atlimage.h:692
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3520
bool m_bHasAlphaCh
Definition: atlimage.h:994

Referenced by Draw(), and START_TEST().

◆ Draw() [2/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
const RECT rectDest,
const RECT rectSrc 
) const
throw (
)
inline

Definition at line 241 of file atlimage.h.

242  {
243  return Draw(hDestDC, rectDest.left, rectDest.top,
244  rectDest.right - rectDest.left,
245  rectDest.bottom - rectDest.top,
246  rectSrc.left, rectSrc.top,
247  rectSrc.right - rectSrc.left,
248  rectSrc.bottom - rectSrc.top);
249  }
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const
Definition: atlimage.h:216
LONG bottom
Definition: windef.h:309

◆ Draw() [3/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
int  xDest,
int  yDest 
) const
throw (
)
inline

Definition at line 250 of file atlimage.h.

251  {
252  return Draw(hDestDC, xDest, yDest, GetWidth(), GetHeight());
253  }
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const
Definition: atlimage.h:216
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297

◆ Draw() [4/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
const POINT pointDest 
) const
throw (
)
inline

Definition at line 254 of file atlimage.h.

255  {
256  return Draw(hDestDC, pointDest.x, pointDest.y);
257  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const
Definition: atlimage.h:216

◆ Draw() [5/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight 
) const
throw (
)
inline

Definition at line 258 of file atlimage.h.

260  {
261  return Draw(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
262  0, 0, GetWidth(), GetHeight());
263  }
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const
Definition: atlimage.h:216
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297

◆ Draw() [6/6]

BOOL ATL::CImage::Draw ( HDC  hDestDC,
const RECT rectDest 
) const
throw (
)
inline

Definition at line 264 of file atlimage.h.

265  {
266  return Draw(hDestDC, rectDest.left, rectDest.top,
267  rectDest.right - rectDest.left,
268  rectDest.bottom - rectDest.top);
269  }
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const
Definition: atlimage.h:216
LONG bottom
Definition: windef.h:309

◆ FileTypeFromExtension()

const GUID* ATL::CImage::FileTypeFromExtension ( LPCWSTR  pszExt) const
inlineprotected

Definition at line 1026 of file atlimage.h.

1027  {
1028  static const EXTENSION_ENTRY table[] =
1029  {
1030  {L".jpg", Gdiplus::ImageFormatJPEG},
1031  {L".png", Gdiplus::ImageFormatPNG},
1032  {L".bmp", Gdiplus::ImageFormatBMP},
1033  {L".gif", Gdiplus::ImageFormatGIF},
1034  {L".tif", Gdiplus::ImageFormatTIFF},
1035  {L".jpeg", Gdiplus::ImageFormatJPEG},
1036  {L".jpe", Gdiplus::ImageFormatJPEG},
1037  {L".jfif", Gdiplus::ImageFormatJPEG},
1038  {L".dib", Gdiplus::ImageFormatBMP},
1039  {L".rle", Gdiplus::ImageFormatBMP},
1040  {L".tiff", Gdiplus::ImageFormatTIFF}
1041  };
1042  const size_t count = _countof(table);
1043  for (size_t i = 0; i < count; ++i)
1044  {
1045  if (::lstrcmpiW(table[i].pszExt, pszExt) == 0)
1046  return &table[i].guid;
1047  }
1048  return NULL;
1049  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define _countof(array)
Definition: sndvol32.h:68
static const WCHAR L[]
Definition: oid.c:1250

Referenced by Save().

◆ GetBits()

void* ATL::CImage::GetBits ( )
throw (
)
inline

Definition at line 271 of file atlimage.h.

272  {
274  BYTE *pb = (BYTE *)m_bm.bmBits;
276  {
277  pb += m_bm.bmWidthBytes * (m_bm.bmHeight - 1);
278  }
279  return pb;
280  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
if(!(yy_init))
Definition: macro.lex.yy.c:714
unsigned char BYTE
Definition: xxhash.c:193
BITMAP m_bm
Definition: atlimage.h:999
DIBOrientation m_eOrientation
Definition: atlimage.h:993
bool IsDIBSection() const
Definition: atlimage.h:360

Referenced by GetPixelAddress().

◆ GetBPP()

int ATL::CImage::GetBPP ( ) const
throw (
)
inline

Definition at line 282 of file atlimage.h.

283  {
284  ATLASSERT(m_hbm);
285  return m_bm.bmBitsPixel;
286  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HBITMAP m_hbm
Definition: atlimage.h:990
BITMAP m_bm
Definition: atlimage.h:999

Referenced by GetPixelAddress(), IsIndexed(), and START_TEST().

◆ GetClsidFromFileType()

bool ATL::CImage::GetClsidFromFileType ( CLSID clsid,
const GUID guid 
) const
inlineprotected

Definition at line 1057 of file atlimage.h.

1058  {
1059  static const FORMAT_ENTRY table[] =
1060  {
1061  {Gdiplus::ImageFormatJPEG, L"image/jpeg"},
1062  {Gdiplus::ImageFormatPNG, L"image/png"},
1063  {Gdiplus::ImageFormatBMP, L"image/bmp"},
1064  {Gdiplus::ImageFormatGIF, L"image/gif"},
1065  {Gdiplus::ImageFormatTIFF, L"image/tiff"}
1066  };
1067  const size_t count = _countof(table);
1068  for (size_t i = 0; i < count; ++i)
1069  {
1070  if (IsGuidEqual(table[i].guid, *guid))
1071  {
1072  int num = GetEncoderClsid(table[i].mime, clsid);
1073  if (num >= 0)
1074  {
1075  return true;
1076  }
1077  }
1078  }
1079  return false;
1080  }
const WCHAR * mime
Definition: mimefilter.c:512
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const GUID * guid
#define _countof(array)
Definition: sndvol32.h:68
int GetEncoderClsid(LPCWSTR mime, CLSID *clsid) const
Definition: atlimage.h:1082
GLuint GLuint num
Definition: glext.h:9618
REFCLSID clsid
Definition: msctf.c:82
static const WCHAR L[]
Definition: oid.c:1250
bool IsGuidEqual(const GUID &guid1, const GUID &guid2) const
Definition: atlimage.h:1112

Referenced by Save().

◆ GetColorTable()

void ATL::CImage::GetColorTable ( UINT  iFirstColor,
UINT  nColors,
RGBQUAD prgbColors 
) const
throw (
)
inline

Definition at line 288 of file atlimage.h.

290  {
292  GetDC();
293  ::GetDIBColorTable(m_hDC, iFirstColor, nColors, prgbColors);
294  ReleaseDC();
295  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void ReleaseDC() const
Definition: atlimage.h:106
UINT WINAPI GetDIBColorTable(HDC hDC, UINT iStartIndex, UINT cEntries, RGBQUAD *pColors)
Definition: palette.c:123
HDC GetDC() const
Definition: atlimage.h:96
bool IsDIBSection() const
Definition: atlimage.h:360

Referenced by RGBFromPaletteIndex().

◆ GetCommon()

static COMMON& ATL::CImage::GetCommon ( )
inlinestaticprotected

Definition at line 981 of file atlimage.h.

982  {
983  COMMON*& pCommon = GetCommonPtr();
984  if (pCommon == NULL)
985  pCommon = new COMMON;
986  return *pCommon;
987  }
smooth NULL
Definition: ftsmooth.c:416
static COMMON *& GetCommonPtr()
Definition: atlimage.h:975

Referenced by CImage(), GetEncoderClsid(), Load(), and Save().

◆ GetCommonFilterString()

static HRESULT ATL::CImage::GetCommonFilterString ( CSimpleString strFilter,
CSimpleArray< GUID > &  aguidFileTypes,
LPCTSTR  pszAllFilesDescription,
DWORD  dwExclude,
TCHAR  chSeparator 
)
inlinestaticprotected

Definition at line 720 of file atlimage.h.

726  {
727  static const FILTER_DATA table[] =
728  {
729  {excludeBMP, TEXT("BMP"), TEXT("*.BMP;*.DIB;*.RLE"), &Gdiplus::ImageFormatBMP},
730  {excludeJPEG, TEXT("JPEG"), TEXT("*.JPG;*.JPEG;*.JPE;*.JFIF"), &Gdiplus::ImageFormatJPEG},
731  {excludeGIF, TEXT("GIF"), TEXT("*.GIF"), &Gdiplus::ImageFormatGIF},
732  {excludeEMF, TEXT("EMF"), TEXT("*.EMF"), &Gdiplus::ImageFormatEMF},
733  {excludeWMF, TEXT("WMF"), TEXT("*.WMF"), &Gdiplus::ImageFormatWMF},
734  {excludeTIFF, TEXT("TIFF"), TEXT("*.TIF;*.TIFF"), &Gdiplus::ImageFormatTIFF},
735  {excludePNG, TEXT("PNG"), TEXT("*.PNG"), &Gdiplus::ImageFormatPNG},
736  {excludeIcon, TEXT("ICO"), TEXT("*.ICO"), &Gdiplus::ImageFormatIcon}
737  };
738 
739  if (pszAllFilesDescription)
740  {
741  strFilter += pszAllFilesDescription;
742  strFilter += chSeparator;
743 
744  BOOL bFirst = TRUE;
745  for (size_t i = 0; i < _countof(table); ++i)
746  {
747  if ((dwExclude & table[i].dwExclude) != 0)
748  continue;
749 
750  if (bFirst)
751  bFirst = FALSE;
752  else
753  strFilter += TEXT(';');
754 
755  strFilter += table[i].extensions;
756  }
757  strFilter += chSeparator;
758 
759  aguidFileTypes.Add(GUID_NULL);
760  }
761 
762  for (size_t i = 0; i < _countof(table); ++i)
763  {
764  if ((dwExclude & table[i].dwExclude) != 0)
765  continue;
766  strFilter += table[i].title;
767  strFilter += TEXT(" (");
768  strFilter += table[i].extensions;
769  strFilter += TEXT(")");
770  strFilter += chSeparator;
771  strFilter += table[i].extensions;
772  strFilter += chSeparator;
773 
774  aguidFileTypes.Add(*table[i].guid);
775  }
776 
777  strFilter += chSeparator;
778 
779  return S_OK;
780  }
#define TRUE
Definition: types.h:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const GUID * guid
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define _countof(array)
Definition: sndvol32.h:68
#define GUID_NULL
Definition: ks.h:106
#define S_OK
Definition: intsafe.h:51
#define TEXT(s)
Definition: k32.h:26

Referenced by GetExporterFilterString(), and GetImporterFilterString().

◆ GetCommonPtr()

static COMMON*& ATL::CImage::GetCommonPtr ( )
inlinestaticprotected

Definition at line 975 of file atlimage.h.

976  {
977  static COMMON *s_pCommon = NULL;
978  return s_pCommon;
979  }
smooth NULL
Definition: ftsmooth.c:416

Referenced by GetCommon(), and ReleaseGDIPlus().

◆ GetDC()

HDC ATL::CImage::GetDC ( ) const
throw (
)
inline

Definition at line 96 of file atlimage.h.

97  {
98  if (m_hDC)
99  return m_hDC;
100 
103  return m_hDC;
104  }
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1499
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
smooth NULL
Definition: ftsmooth.c:416
HBITMAP m_hbm
Definition: atlimage.h:990
HGDIOBJ m_hbmOld
Definition: atlimage.h:991

Referenced by AlphaBlend(), BitBlt(), GetColorTable(), GetPixel(), MaskBlt(), PlgBlt(), SetColorTable(), SetPixel(), SetPixelIndexed(), START_TEST(), StretchBlt(), and TransparentBlt().

◆ GetEncoderClsid()

int ATL::CImage::GetEncoderClsid ( LPCWSTR  mime,
CLSID clsid 
) const
inlineprotected

Definition at line 1082 of file atlimage.h.

1083  {
1084  UINT count = 0, total_size = 0;
1085  GetCommon().GetImageEncodersSize(&count, &total_size);
1086  if (total_size == 0)
1087  return -1; // failure
1088 
1089  Gdiplus::ImageCodecInfo *pInfo;
1090  BYTE *pb = new BYTE[total_size];
1091  ATLASSERT(pb);
1092  pInfo = reinterpret_cast<Gdiplus::ImageCodecInfo *>(pb);
1093  if (pInfo == NULL)
1094  return -1; // failure
1095 
1096  GetCommon().GetImageEncoders(count, total_size, pInfo);
1097 
1098  for (UINT iInfo = 0; iInfo < count; ++iInfo)
1099  {
1100  if (::lstrcmpiW(pInfo[iInfo].MimeType, mime) == 0)
1101  {
1102  *clsid = pInfo[iInfo].Clsid;
1103  delete[] pb;
1104  return iInfo; // success
1105  }
1106  }
1107 
1108  delete[] pb;
1109  return -1; // failure
1110  }
const WCHAR * mime
Definition: mimefilter.c:512
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
GLuint GLuint GLsizei count
Definition: gl.h:1545
GETIMAGEENCODERSSIZE GetImageEncodersSize
Definition: atlimage.h:870
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
smooth NULL
Definition: ftsmooth.c:416
GETIMAGEENCODERS GetImageEncoders
Definition: atlimage.h:871
REFCLSID clsid
Definition: msctf.c:82
static COMMON & GetCommon()
Definition: atlimage.h:981
unsigned char BYTE
Definition: xxhash.c:193
struct ImageCodecInfo ImageCodecInfo
unsigned int UINT
Definition: ndis.h:50

Referenced by GetClsidFromFileType().

◆ GetExporterFilterString()

static HRESULT ATL::CImage::GetExporterFilterString ( CSimpleString strExporters,
CSimpleArray< GUID > &  aguidFileTypes,
LPCTSTR  pszAllFilesDescription = NULL,
DWORD  dwExclude = excludeDefaultSave,
TCHAR  chSeparator = TEXT('|') 
)
inlinestatic

Definition at line 797 of file atlimage.h.

803  {
804  return GetCommonFilterString(strExporters,
805  aguidFileTypes,
806  pszAllFilesDescription,
807  dwExclude,
808  chSeparator);
809  }
static HRESULT GetCommonFilterString(CSimpleString &strFilter, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription, DWORD dwExclude, TCHAR chSeparator)
Definition: atlimage.h:720

◆ GetFileExtension()

LPCWSTR ATL::CImage::GetFileExtension ( LPCWSTR  pszFileName) const
inlineprotected

Definition at line 1003 of file atlimage.h.

1004  {
1005  LPCWSTR pch = wcsrchr(pszFileName, L'\\');
1006  if (pch == NULL)
1007  pch = wcsrchr(pszFileName, L'/');
1008  pch = (pch ? wcsrchr(pch, L'.') : wcsrchr(pszFileName, L'.'));
1009  return (pch ? pch : (pszFileName + ::lstrlenW(pszFileName)));
1010  }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define lstrlenW
Definition: compat.h:498
#define pch(ap)
Definition: match.c:418
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
#define wcsrchr
Definition: compat.h:16

Referenced by Save().

◆ GetHeight()

int ATL::CImage::GetHeight ( ) const
throw (
)
inline

Definition at line 297 of file atlimage.h.

298  {
299  ATLASSERT(m_hbm);
300  return m_bm.bmHeight;
301  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HBITMAP m_hbm
Definition: atlimage.h:990
BITMAP m_bm
Definition: atlimage.h:999

Referenced by AlphaBlend(), BitBlt(), Draw(), MaskBlt(), PlgBlt(), START_TEST(), StretchBlt(), and TransparentBlt().

◆ GetImporterFilterString()

static HRESULT ATL::CImage::GetImporterFilterString ( CSimpleString strImporters,
CSimpleArray< GUID > &  aguidFileTypes,
LPCTSTR  pszAllFilesDescription = NULL,
DWORD  dwExclude = excludeDefaultLoad,
TCHAR  chSeparator = TEXT('|') 
)
inlinestatic

Definition at line 783 of file atlimage.h.

789  {
790  return GetCommonFilterString(strImporters,
791  aguidFileTypes,
792  pszAllFilesDescription,
793  dwExclude,
794  chSeparator);
795  }
static HRESULT GetCommonFilterString(CSimpleString &strFilter, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription, DWORD dwExclude, TCHAR chSeparator)
Definition: atlimage.h:720

◆ GetMaxColorTableEntries()

int ATL::CImage::GetMaxColorTableEntries ( ) const
throw (
)
inline

Definition at line 303 of file atlimage.h.

304  {
307  return m_ds.dsBmih.biClrUsed;
308  switch (m_bm.bmBitsPixel)
309  {
310  case 1: return 2;
311  case 4: return 16;
312  case 8: return 256;
313  case 16: case 32:
315  return 3;
316  return 0;
317  case 24:
318  default:
319  return 0;
320  }
321  }
BITMAPINFOHEADER dsBmih
Definition: wingdi.h:1669
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define BI_BITFIELDS
Definition: mmreg.h:507
DWORD biCompression
Definition: amvideo.idl:35
BITMAP m_bm
Definition: atlimage.h:999
DIBSECTION m_ds
Definition: atlimage.h:1000
bool IsDIBSection() const
Definition: atlimage.h:360

◆ GetPitch()

int ATL::CImage::GetPitch ( ) const
throw (
)
inline

Definition at line 323 of file atlimage.h.

324  {
327  return -m_bm.bmWidthBytes;
328  else
329  return m_bm.bmWidthBytes;
330  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
BITMAP m_bm
Definition: atlimage.h:999
DIBOrientation m_eOrientation
Definition: atlimage.h:993
bool IsDIBSection() const
Definition: atlimage.h:360

Referenced by GetPixelAddress().

◆ GetPixel()

COLORREF ATL::CImage::GetPixel ( int  x,
int  y 
) const
throw (
)
inline

Definition at line 332 of file atlimage.h.

333  {
334  GetDC();
336  ReleaseDC();
337  return ret;
338  }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void ReleaseDC() const
Definition: atlimage.h:106
DWORD COLORREF
Definition: windef.h:300
int ret
HDC GetDC() const
Definition: atlimage.h:96
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
COLORREF GetPixel(int x, int y) const
Definition: atlimage.h:332

Referenced by START_TEST().

◆ GetPixelAddress()

void* ATL::CImage::GetPixelAddress ( int  x,
int  y 
)
throw (
)
inline

Definition at line 340 of file atlimage.h.

341  {
343  BYTE *pb = (BYTE *)GetBits();
344  pb += GetPitch() * y;
345  pb += (GetBPP() * x) / 8;
346  return pb;
347  }
void * GetBits()
Definition: atlimage.h:271
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
unsigned char BYTE
Definition: xxhash.c:193
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
int GetBPP() const
Definition: atlimage.h:282
int GetPitch() const
Definition: atlimage.h:323
bool IsDIBSection() const
Definition: atlimage.h:360

◆ GetTransparentColor()

COLORREF ATL::CImage::GetTransparentColor ( ) const
throw (
)
inline

Definition at line 349 of file atlimage.h.

350  {
351  return m_rgbTransColor;
352  }
COLORREF m_rgbTransColor
Definition: atlimage.h:996

◆ GetWidth()

int ATL::CImage::GetWidth ( ) const
throw (
)
inline

Definition at line 354 of file atlimage.h.

355  {
356  ATLASSERT(m_hbm);
357  return m_bm.bmWidth;
358  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HBITMAP m_hbm
Definition: atlimage.h:990
BITMAP m_bm
Definition: atlimage.h:999

Referenced by AlphaBlend(), BitBlt(), Draw(), MaskBlt(), PlgBlt(), START_TEST(), StretchBlt(), and TransparentBlt().

◆ IsDIBSection()

bool ATL::CImage::IsDIBSection ( ) const
throw (
)
inline

Definition at line 360 of file atlimage.h.

361  {
362  ATLASSERT(m_hbm);
363  return m_bIsDIBSec;
364  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HBITMAP m_hbm
Definition: atlimage.h:990
bool m_bIsDIBSec
Definition: atlimage.h:995

Referenced by GetBits(), GetColorTable(), GetMaxColorTableEntries(), GetPitch(), GetPixelAddress(), IsIndexed(), and SetColorTable().

◆ IsGuidEqual()

bool ATL::CImage::IsGuidEqual ( const GUID guid1,
const GUID guid2 
) const
inlineprotected

Definition at line 1112 of file atlimage.h.

1113  {
1115  if (::UuidEqual(const_cast<GUID *>(&guid1),
1116  const_cast<GUID *>(&guid2), &status))
1117  {
1118  if (status == RPC_S_OK)
1119  return true;
1120  }
1121  return false;
1122  }
int WINAPI UuidEqual(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
Definition: rpcrt4_main.c:250
long RPC_STATUS
Definition: rpc.h:52
static GUID guid2
Definition: devinst.c:42
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by GetClsidFromFileType(), and Save().

◆ IsIndexed()

bool ATL::CImage::IsIndexed ( ) const
throw (
)
inline

Definition at line 366 of file atlimage.h.

367  {
369  return GetBPP() <= 8;
370  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
int GetBPP() const
Definition: atlimage.h:282
bool IsDIBSection() const
Definition: atlimage.h:360

Referenced by SetPixelIndexed().

◆ IsNull()

bool ATL::CImage::IsNull ( ) const
throw (
)
inline

Definition at line 372 of file atlimage.h.

373  {
374  return m_hbm == NULL;
375  }
smooth NULL
Definition: ftsmooth.c:416
HBITMAP m_hbm
Definition: atlimage.h:990

Referenced by START_TEST().

◆ IsTransparencySupported()

static BOOL ATL::CImage::IsTransparencySupported ( )
throw (
)
inlinestatic

Definition at line 692 of file atlimage.h.

693  {
694  return TRUE;
695  }
#define TRUE
Definition: types.h:120

Referenced by AlphaBlend(), Draw(), MaskBlt(), PlgBlt(), and TransparentBlt().

◆ Load() [1/2]

HRESULT ATL::CImage::Load ( LPCTSTR  pszFileName)
throw (
)
inline

Definition at line 377 of file atlimage.h.

378  {
379  // convert the file name string into Unicode
380  CStringW pszNameW(pszFileName);
381 
382  // create a GpBitmap object from file
383  using namespace Gdiplus;
384  GpBitmap *pBitmap = NULL;
385  GetCommon().CreateBitmapFromFile(pszNameW, &pBitmap);
386  ATLASSERT(pBitmap);
387 
388  // TODO & FIXME: get parameters (m_rgbTransColor etc.)
389 
390  // get bitmap handle
391  HBITMAP hbm = NULL;
392  Color color(0xFF, 0xFF, 0xFF);
395  pBitmap, &hbm, color.GetValue());
396 
397  // delete GpBitmap
398  GetCommon().DisposeImage(pBitmap);
399 
400  // attach it
401  if (status == Ok)
402  Attach(hbm);
403  return (status == Ok ? S_OK : E_FAIL);
404  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: atlimage.h:872
#define E_FAIL
Definition: ddrawi.h:102
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
GLuint color
Definition: glext.h:6243
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
smooth NULL
Definition: ftsmooth.c:416
Status
Definition: gdiplustypes.h:24
static COMMON & GetCommon()
Definition: atlimage.h:981
#define S_OK
Definition: intsafe.h:51
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:873
static HBITMAP
Definition: button.c:44
static SERVICE_STATUS status
Definition: service.c:31
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT)
Definition: atlimage.h:79
Definition: ps.c:97

Referenced by START_TEST().

◆ Load() [2/2]

HRESULT ATL::CImage::Load ( IStream pStream)
throw (
)
inline

Definition at line 405 of file atlimage.h.

406  {
407  // create GpBitmap from stream
408  using namespace Gdiplus;
409  GpBitmap *pBitmap = NULL;
410  GetCommon().CreateBitmapFromStream(pStream, &pBitmap);
411  ATLASSERT(pBitmap);
412 
413  // TODO & FIXME: get parameters (m_rgbTransColor etc.)
414 
415  // get bitmap handle
416  HBITMAP hbm = NULL;
417  Color color(0xFF, 0xFF, 0xFF);
420  pBitmap, &hbm, color.GetValue());
421 
422  // delete Bitmap
423  GetCommon().DisposeImage(pBitmap);
424 
425  // attach it
426  if (status == Ok)
427  Attach(hbm);
428  return (status == Ok ? S_OK : E_FAIL);
429  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
CREATEBITMAPFROMSTREAM CreateBitmapFromStream
Definition: atlimage.h:874
#define E_FAIL
Definition: ddrawi.h:102
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
GLuint color
Definition: glext.h:6243
smooth NULL
Definition: ftsmooth.c:416
Status
Definition: gdiplustypes.h:24
static COMMON & GetCommon()
Definition: atlimage.h:981
#define S_OK
Definition: intsafe.h:51
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
CREATEHBITMAPFROMBITMAP CreateHBITMAPFromBitmap
Definition: atlimage.h:873
static HBITMAP
Definition: button.c:44
static SERVICE_STATUS status
Definition: service.c:31
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT)
Definition: atlimage.h:79
Definition: ps.c:97

◆ LoadFromResource() [1/2]

void ATL::CImage::LoadFromResource ( HINSTANCE  hInstance,
LPCTSTR  pszResourceName 
)
throw (
)
inline

Definition at line 432 of file atlimage.h.

433  {
434  HANDLE hHandle = ::LoadImage(hInstance, pszResourceName,
436  Attach(reinterpret_cast<HBITMAP>(hHandle));
437  }
HINSTANCE hInstance
Definition: charmap.c:20
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IMAGE_BITMAP
Definition: winuser.h:211
#define LoadImage
Definition: winuser.h:5790
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT)
Definition: atlimage.h:79

Referenced by LoadFromResource(), and START_TEST().

◆ LoadFromResource() [2/2]

void ATL::CImage::LoadFromResource ( HINSTANCE  hInstance,
UINT  nIDResource 
)
throw (
)
inline

Definition at line 438 of file atlimage.h.

439  {
441  }
#define MAKEINTRESOURCE
Definition: winuser.h:591
void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName)
Definition: atlimage.h:432
HINSTANCE hInstance
Definition: charmap.c:20

◆ MaskBlt() [1/4]

BOOL ATL::CImage::MaskBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
HBITMAP  hbmMask,
int  xMask,
int  yMask,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 443 of file atlimage.h.

447  {
449  GetDC();
450  BOOL ret = ::MaskBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
451  m_hDC, xSrc, ySrc,
452  hbmMask, xMask, yMask, dwROP);
453  ReleaseDC();
454  return ret;
455  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL IsTransparencySupported()
Definition: atlimage.h:692
int ret
HDC GetDC() const
Definition: atlimage.h:96
BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:443

Referenced by MaskBlt().

◆ MaskBlt() [2/4]

BOOL ATL::CImage::MaskBlt ( HDC  hDestDC,
const RECT rectDest,
const POINT pointSrc,
HBITMAP  hbmMask,
const POINT pointMask,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 456 of file atlimage.h.

459  {
460  return MaskBlt(hDestDC, rectDest.left, rectDest.top,
461  rectDest.right - rectDest.left, rectDest.bottom - rectDest.top,
462  pointSrc.x, pointSrc.y, hbmMask, pointMask.x, pointMask.y, dwROP);
463  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:443

◆ MaskBlt() [3/4]

BOOL ATL::CImage::MaskBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
HBITMAP  hbmMask,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 464 of file atlimage.h.

466  {
467  return MaskBlt(hDestDC, xDest, yDest, GetWidth(), GetHeight(),
468  0, 0, hbmMask, 0, 0, dwROP);
469  }
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297
BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:443

◆ MaskBlt() [4/4]

BOOL ATL::CImage::MaskBlt ( HDC  hDestDC,
const POINT pointDest,
HBITMAP  hbmMask,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 470 of file atlimage.h.

472  {
473  return MaskBlt(hDestDC, pointDest.x, pointDest.y, hbmMask, dwROP);
474  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
BOOL MaskBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:443

◆ operator HBITMAP()

Definition at line 73 of file atlimage.h.

74  {
75  return m_hbm;
76  }
HBITMAP m_hbm
Definition: atlimage.h:990

◆ operator=()

◆ PlgBlt() [1/4]

BOOL ATL::CImage::PlgBlt ( HDC  hDestDC,
const POINT pPoints,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
HBITMAP  hbmMask = NULL,
int  xMask = 0,
int  yMask = 0 
) const
throw (
)
inline

Definition at line 476 of file atlimage.h.

480  {
482  GetDC();
483  BOOL ret = ::PlgBlt(hDestDC, pPoints, m_hDC,
484  xSrc, ySrc, nSrcWidth, nSrcHeight,
485  hbmMask, xMask, yMask);
486  ReleaseDC();
487  return ret;
488  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL PlgBlt(HDC hDestDC, const POINT *pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask=NULL, int xMask=0, int yMask=0) const
Definition: atlimage.h:476
static BOOL IsTransparencySupported()
Definition: atlimage.h:692
int ret
HDC GetDC() const
Definition: atlimage.h:96

Referenced by PlgBlt().

◆ PlgBlt() [2/4]

BOOL ATL::CImage::PlgBlt ( HDC  hDestDC,
const POINT pPoints,
HBITMAP  hbmMask = NULL 
) const
throw (
)
inline

Definition at line 489 of file atlimage.h.

491  {
492  return PlgBlt(hDestDC, pPoints, 0, 0, GetWidth(), GetHeight(),
493  hbmMask);
494  }
int GetWidth() const
Definition: atlimage.h:354
BOOL PlgBlt(HDC hDestDC, const POINT *pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask=NULL, int xMask=0, int yMask=0) const
Definition: atlimage.h:476
int GetHeight() const
Definition: atlimage.h:297

◆ PlgBlt() [3/4]

BOOL ATL::CImage::PlgBlt ( HDC  hDestDC,
const POINT pPoints,
const RECT rectSrc,
HBITMAP  hbmMask,
const POINT pointMask 
) const
throw (
)
inline

Definition at line 495 of file atlimage.h.

497  {
498  return PlgBlt(hDestDC, pPoints, rectSrc.left, rectSrc.top,
499  rectSrc.right - rectSrc.left, rectSrc.bottom - rectSrc.top,
500  hbmMask, pointMask.x, pointMask.y);
501  }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
BOOL PlgBlt(HDC hDestDC, const POINT *pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask=NULL, int xMask=0, int yMask=0) const
Definition: atlimage.h:476
LONG bottom
Definition: windef.h:309

◆ PlgBlt() [4/4]

BOOL ATL::CImage::PlgBlt ( HDC  hDestDC,
const POINT pPoints,
const RECT rectSrc,
HBITMAP  hbmMask = NULL 
) const
throw (
)
inline

Definition at line 502 of file atlimage.h.

504  {
505  POINT pointMask = {0, 0};
506  return PlgBlt(hDestDC, pPoints, rectSrc, hbmMask, pointMask);
507  }
BOOL PlgBlt(HDC hDestDC, const POINT *pPoints, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, HBITMAP hbmMask=NULL, int xMask=0, int yMask=0) const
Definition: atlimage.h:476

◆ ReleaseDC()

void ATL::CImage::ReleaseDC ( ) const
throw (
)
inline

Definition at line 106 of file atlimage.h.

107  {
108  ATLASSERT(m_hDC);
109 
110  if (m_hDC == NULL)
111  return;
112 
113  if (m_hbmOld)
114  {
116  m_hbmOld = NULL;
117  }
118  ::DeleteDC(m_hDC);
119  m_hDC = NULL;
120  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1499
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DeleteDC(_In_ HDC)
HGDIOBJ m_hbmOld
Definition: atlimage.h:991

Referenced by AlphaBlend(), BitBlt(), GetColorTable(), GetPixel(), MaskBlt(), PlgBlt(), SetColorTable(), SetPixel(), SetPixelIndexed(), START_TEST(), StretchBlt(), and TransparentBlt().

◆ ReleaseGDIPlus()

void ATL::CImage::ReleaseGDIPlus ( )
throw (
)
inline

Definition at line 509 of file atlimage.h.

510  {
511  COMMON*& pCommon = GetCommonPtr();
512  if (pCommon && pCommon->Release() == 0)
513  {
514  delete pCommon;
515  pCommon = NULL;
516  }
517  }
smooth NULL
Definition: ftsmooth.c:416
static COMMON *& GetCommonPtr()
Definition: atlimage.h:975

Referenced by ~CImage().

◆ RGBFromPaletteIndex()

COLORREF ATL::CImage::RGBFromPaletteIndex ( int  iIndex) const
inlineprotected

Definition at line 1012 of file atlimage.h.

1013  {
1014  RGBQUAD table[256];
1015  GetColorTable(0, 256, table);
1016  RGBQUAD& quad = table[iIndex];
1017  return RGB(quad.rgbRed, quad.rgbGreen, quad.rgbBlue);
1018  }
#define RGB(r, g, b)
Definition: precomp.h:62
ULONG RGBQUAD
Definition: precomp.h:50
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
void GetColorTable(UINT iFirstColor, UINT nColors, RGBQUAD *prgbColors) const
Definition: atlimage.h:288

Referenced by Draw().

◆ Save() [1/2]

HRESULT ATL::CImage::Save ( IStream pStream,
GUID guidFileType 
) const
throw (
)
inline

Definition at line 519 of file atlimage.h.

520  {
521  using namespace Gdiplus;
522  ATLASSERT(m_hbm);
523 
524  // TODO & FIXME: set parameters (m_rgbTransColor etc.)
525  CLSID clsid;
526  if (!GetClsidFromFileType(&clsid, guidFileType))
527  return E_FAIL;
528 
529  // create a GpBitmap from HBITMAP
530  GpBitmap *pBitmap = NULL;
532 
533  // save to stream
534  Status status;
535  status = GetCommon().SaveImageToStream(pBitmap, pStream, &clsid, NULL);
536 
537  // destroy GpBitmap
538  GetCommon().DisposeImage(pBitmap);
539 
540  return (status == Ok ? S_OK : E_FAIL);
541  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define E_FAIL
Definition: ddrawi.h:102
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
smooth NULL
Definition: ftsmooth.c:416
HBITMAP m_hbm
Definition: atlimage.h:990
SAVEIMAGETOSTREAM SaveImageToStream
Definition: atlimage.h:876
bool GetClsidFromFileType(CLSID *clsid, const GUID *guid) const
Definition: atlimage.h:1057
Status
Definition: gdiplustypes.h:24
REFCLSID clsid
Definition: msctf.c:82
static COMMON & GetCommon()
Definition: atlimage.h:981
#define S_OK
Definition: intsafe.h:51
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:875
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ Save() [2/2]

HRESULT ATL::CImage::Save ( LPCTSTR  pszFileName,
REFGUID  guidFileType = GUID_NULL 
) const
throw (
)
inline

Definition at line 542 of file atlimage.h.

544  {
545  using namespace Gdiplus;
546  ATLASSERT(m_hbm);
547 
548  // TODO & FIXME: set parameters (m_rgbTransColor etc.)
549 
550  // convert the file name string into Unicode
551  CStringW pszNameW(pszFileName);
552 
553  // if the file type is null, get the file type from extension
554  const GUID *FileType = &guidFileType;
555  if (IsGuidEqual(guidFileType, GUID_NULL))
556  {
557  LPCWSTR pszExt = GetFileExtension(pszNameW);
558  FileType = FileTypeFromExtension(pszExt);
559  }
560 
561  // get CLSID from file type
562  CLSID clsid;
563  if (!GetClsidFromFileType(&clsid, FileType))
564  return E_FAIL;
565 
566  // create a GpBitmap from HBITMAP
567  GpBitmap *pBitmap = NULL;
569 
570  // save to file
571  Status status;
572  status = GetCommon().SaveImageToFile(pBitmap, pszNameW, &clsid, NULL);
573 
574  // destroy GpBitmap
575  GetCommon().DisposeImage(pBitmap);
576 
577  return (status == Ok ? S_OK : E_FAIL);
578  }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define E_FAIL
Definition: ddrawi.h:102
const GUID * FileTypeFromExtension(LPCWSTR pszExt) const
Definition: atlimage.h:1026
DISPOSEIMAGE DisposeImage
Definition: atlimage.h:878
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
smooth NULL
Definition: ftsmooth.c:416
HBITMAP m_hbm
Definition: atlimage.h:990
LPCWSTR GetFileExtension(LPCWSTR pszFileName) const
Definition: atlimage.h:1003
bool GetClsidFromFileType(CLSID *clsid, const GUID *guid) const
Definition: atlimage.h:1057
Status
Definition: gdiplustypes.h:24
REFCLSID clsid
Definition: msctf.c:82
static COMMON & GetCommon()
Definition: atlimage.h:981
#define GUID_NULL
Definition: ks.h:106
SAVEIMAGETOFILE SaveImageToFile
Definition: atlimage.h:877
#define S_OK
Definition: intsafe.h:51
CREATEBITMAPFROMHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:875
bool IsGuidEqual(const GUID &guid1, const GUID &guid2) const
Definition: atlimage.h:1112
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ SetColorTable()

void ATL::CImage::SetColorTable ( UINT  iFirstColor,
UINT  nColors,
const RGBQUAD prgbColors 
)
throw (
)
inline

Definition at line 580 of file atlimage.h.

582  {
584  GetDC();
585  ::SetDIBColorTable(m_hDC, iFirstColor, nColors, prgbColors);
586  ReleaseDC();
587  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void ReleaseDC() const
Definition: atlimage.h:106
UINT WINAPI SetDIBColorTable(_In_ HDC hdc, _In_ UINT iStart, _In_ UINT cEntries, _In_reads_(cEntries) const RGBQUAD *prgbq)
HDC GetDC() const
Definition: atlimage.h:96
bool IsDIBSection() const
Definition: atlimage.h:360

◆ SetPixel()

void ATL::CImage::SetPixel ( int  x,
int  y,
COLORREF  color 
)
throw (
)
inline

Definition at line 589 of file atlimage.h.

590  {
591  GetDC();
592  ::SetPixelV(m_hDC, x, y, color);
593  ReleaseDC();
594  }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void ReleaseDC() const
Definition: atlimage.h:106
GLuint color
Definition: glext.h:6243
HDC GetDC() const
Definition: atlimage.h:96
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)

Referenced by SetPixelRGB().

◆ SetPixelIndexed()

void ATL::CImage::SetPixelIndexed ( int  x,
int  y,
int  iIndex 
)
throw (
)
inline

Definition at line 596 of file atlimage.h.

597  {
598  ATLASSERT(IsIndexed());
599  GetDC();
600  ::SetPixelV(m_hDC, x, y, PALETTEINDEX(iIndex));
601  ReleaseDC();
602  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
bool IsIndexed() const
Definition: atlimage.h:366
void ReleaseDC() const
Definition: atlimage.h:106
HDC GetDC() const
Definition: atlimage.h:96
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
#define PALETTEINDEX(i)
Definition: wingdi.h:2942

◆ SetPixelRGB()

void ATL::CImage::SetPixelRGB ( int  x,
int  y,
BYTE  r,
BYTE  g,
BYTE  b 
)
throw (
)
inline

Definition at line 604 of file atlimage.h.

605  {
606  SetPixel(x, y, RGB(r, g, b));
607  }
#define RGB(r, g, b)
Definition: precomp.h:62
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void SetPixel(int x, int y, COLORREF color)
Definition: atlimage.h:589
GLboolean GLboolean g
Definition: glext.h:6204
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ SetTransparentColor()

COLORREF ATL::CImage::SetTransparentColor ( COLORREF  rgbTransparent)
throw (
)
inline

Definition at line 609 of file atlimage.h.

610  {
611  ATLASSERT(m_hbm);
612  COLORREF rgbOldColor = m_rgbTransColor;
613  m_rgbTransColor = rgbTransparent;
614  return rgbOldColor;
615  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
COLORREF m_rgbTransColor
Definition: atlimage.h:996
HBITMAP m_hbm
Definition: atlimage.h:990
DWORD COLORREF
Definition: windef.h:300

Referenced by START_TEST().

◆ StretchBlt() [1/4]

BOOL ATL::CImage::StretchBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 617 of file atlimage.h.

621  {
622  GetDC();
623  BOOL ret = ::StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
624  m_hDC, xSrc, ySrc, nSrcWidth, nSrcHeight, dwROP);
625  ReleaseDC();
626  return ret;
627  }
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:617
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
int ret
HDC GetDC() const
Definition: atlimage.h:96

Referenced by Draw(), and StretchBlt().

◆ StretchBlt() [2/4]

BOOL ATL::CImage::StretchBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 628 of file atlimage.h.

631  {
632  return StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
633  0, 0, GetWidth(), GetHeight(), dwROP);
634  }
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:617
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297

◆ StretchBlt() [3/4]

BOOL ATL::CImage::StretchBlt ( HDC  hDestDC,
const RECT rectDest,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 635 of file atlimage.h.

637  {
638  return StretchBlt(hDestDC, rectDest.left, rectDest.top,
639  rectDest.right - rectDest.left,
640  rectDest.bottom - rectDest.top, dwROP);
641  }
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:617
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

◆ StretchBlt() [4/4]

BOOL ATL::CImage::StretchBlt ( HDC  hDestDC,
const RECT rectDest,
const RECT rectSrc,
DWORD  dwROP = SRCCOPY 
) const
throw (
)
inline

Definition at line 642 of file atlimage.h.

644  {
645  return StretchBlt(hDestDC, rectDest.left, rectDest.top,
646  rectDest.right - rectDest.left,
647  rectDest.bottom - rectDest.top,
648  rectSrc.left, rectSrc.top,
649  rectSrc.right - rectSrc.left,
650  rectSrc.bottom - rectSrc.top, dwROP);
651  }
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const
Definition: atlimage.h:617
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

◆ TransparentBlt() [1/4]

BOOL ATL::CImage::TransparentBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
UINT  crTransparent = CLR_INVALID 
) const
throw (
)
inline

Definition at line 653 of file atlimage.h.

657  {
659  GetDC();
660  BOOL ret = ::TransparentBlt(hDestDC, xDest, yDest,
661  nDestWidth, nDestHeight,
662  m_hDC, xSrc, ySrc,
663  nSrcWidth, nSrcHeight, crTransparent);
664  ReleaseDC();
665  return ret;
666  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const
Definition: atlimage.h:653
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL IsTransparencySupported()
Definition: atlimage.h:692
int ret
HDC GetDC() const
Definition: atlimage.h:96

Referenced by Draw(), and TransparentBlt().

◆ TransparentBlt() [2/4]

BOOL ATL::CImage::TransparentBlt ( HDC  hDestDC,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
UINT  crTransparent = CLR_INVALID 
) const
throw (
)
inline

Definition at line 667 of file atlimage.h.

670  {
671  return TransparentBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
672  0, 0, GetWidth(), GetHeight(), crTransparent);
673  }
BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const
Definition: atlimage.h:653
int GetWidth() const
Definition: atlimage.h:354
int GetHeight() const
Definition: atlimage.h:297

◆ TransparentBlt() [3/4]

BOOL ATL::CImage::TransparentBlt ( HDC  hDestDC,
const RECT rectDest,
UINT  crTransparent = CLR_INVALID 
) const
throw (
)
inline

Definition at line 674 of file atlimage.h.

676  {
677  return TransparentBlt(hDestDC, rectDest.left, rectDest.top,
678  rectDest.right - rectDest.left,
679  rectDest.bottom - rectDest.top, crTransparent);
680  }
BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const
Definition: atlimage.h:653
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

◆ TransparentBlt() [4/4]

BOOL ATL::CImage::TransparentBlt ( HDC  hDestDC,
const RECT rectDest,
const RECT rectSrc,
UINT  crTransparent = CLR_INVALID 
) const
throw (
)
inline

Definition at line 681 of file atlimage.h.

684  {
685  return TransparentBlt(hDestDC, rectDest.left, rectDest.top,
686  rectDest.right - rectDest.left, rectDest.bottom - rectDest.left,
687  rectSrc.left, rectSrc.top, rectSrc.right - rectSrc.left,
688  rectSrc.bottom - rectSrc.top, crTransparent);
689  }
BOOL TransparentBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT crTransparent=CLR_INVALID) const
Definition: atlimage.h:653
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309

Member Data Documentation

◆ @4014

union { ... }

◆ m_bHasAlphaCh

bool ATL::CImage::m_bHasAlphaCh
protected

Definition at line 994 of file atlimage.h.

Referenced by AttachInternal(), CImage(), CreateInternal(), Detach(), and Draw().

◆ m_bIsDIBSec

bool ATL::CImage::m_bIsDIBSec
protected

Definition at line 995 of file atlimage.h.

Referenced by AttachInternal(), CImage(), and IsDIBSection().

◆ m_bm

BITMAP ATL::CImage::m_bm

◆ m_ds

DIBSECTION ATL::CImage::m_ds

Definition at line 1000 of file atlimage.h.

Referenced by AttachInternal(), CImage(), Detach(), and GetMaxColorTableEntries().

◆ m_eOrientation

DIBOrientation ATL::CImage::m_eOrientation
protected

Definition at line 993 of file atlimage.h.

Referenced by AttachInternal(), CImage(), Detach(), GetBits(), and GetPitch().

◆ m_hbm

◆ m_hbmOld

HGDIOBJ ATL::CImage::m_hbmOld
mutableprotected

Definition at line 991 of file atlimage.h.

Referenced by CImage(), GetDC(), and ReleaseDC().

◆ m_hDC

◆ m_rgbTransColor

COLORREF ATL::CImage::m_rgbTransColor
protected

The documentation for this class was generated from the following file: