ReactOS 0.4.15-dev-6662-g1b3eed5
ATL::CImage Class Reference

#include <atlimage.h>

Collaboration diagram for ATL::CImage:

Classes

class  CInitGDIPlus
 
struct  MYBITMAPINFOEX
 

Public Types

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

Static Public Member Functions

static void ReleaseGDIPlus ()
 
static BOOL IsTransparencySupported () noexcept
 
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('|'))
 

Private Member Functions

LPCWSTR GetFileExtension (LPCWSTR pszFileName) const
 
COLORREF RGBFromPaletteIndex (int iIndex) const
 
void AttachInternal (HBITMAP hBitmap, DIBOrientation eOrientation, LONG iTransColor) noexcept
 
BOOL CreateInternal (int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0) noexcept
 
 CImage (const CImage &)=delete
 
CImageoperator= (const CImage &)=delete
 

Static Private Member Functions

static bool ShouldExcludeFormat (REFGUID guidFileType, DWORD dwExclude)
 
static HRESULT BuildCodecFilterString (const Gdiplus::ImageCodecInfo *pCodecs, UINT cCodecs, CSimpleString &strFilter, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription, DWORD dwExclude, TCHAR chSeparator)
 
static bool InitGDIPlus () noexcept
 
static CLSID FindCodecForExtension (LPCTSTR dotext, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
 
static CLSID FindCodecForFileType (REFGUID guidFileType, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
 
static Gdiplus::ImageCodecInfo * _getAllEncoders (UINT &cEncoders)
 
static Gdiplus::ImageCodecInfo * _getAllDecoders (UINT &cDecoders)
 

Private Attributes

HBITMAP m_hBitmap = NULL
 
HBITMAP m_hOldBitmap = NULL
 
INT m_nWidth = 0
 
INT m_nHeight = 0
 
INT m_nPitch = 0
 
INT m_nBPP = 0
 
LPVOID m_pBits = NULL
 
BOOL m_bHasAlphaChannel = FALSE
 
BOOL m_bIsDIBSection = FALSE
 
COLORREF m_clrTransparentColor = CLR_INVALID
 
HDC m_hDC = NULL
 
LONG m_nDCRefCount = 0
 

Static Private Attributes

static CInitGDIPlus s_gdiplus
 

Detailed Description

Definition at line 23 of file atlimage.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
createAlphaChannel 

Definition at line 27 of file atlimage.h.

28 {
29 createAlphaChannel = 1 // enable alpha
30 };
@ createAlphaChannel
Definition: atlimage.h:29

◆ DIBOrientation

Enumerator
DIBOR_DEFAULT 
DIBOR_TOPDOWN 
DIBOR_BOTTOMUP 

Definition at line 33 of file atlimage.h.

34 {
35 DIBOR_DEFAULT, // default
36 DIBOR_TOPDOWN, // top-down DIB
37 DIBOR_BOTTOMUP // bottom-up DIB
38 };
@ DIBOR_DEFAULT
Definition: atlimage.h:35
@ DIBOR_TOPDOWN
Definition: atlimage.h:36
@ DIBOR_BOTTOMUP
Definition: atlimage.h:37

◆ ExcludeFlags

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

Definition at line 691 of file atlimage.h.

692 {
693 excludeGIF = 0x01,
694 excludeBMP = 0x02,
695 excludeEMF = 0x04,
696 excludeWMF = 0x08,
697 excludeJPEG = 0x10,
698 excludePNG = 0x20,
699 excludeTIFF = 0x40,
700 excludeIcon = 0x80,
701 excludeOther = 0x80000000,
704 };
@ excludeDefaultLoad
Definition: atlimage.h:702
@ excludeDefaultSave
Definition: atlimage.h:703
@ excludeOther
Definition: atlimage.h:701

Constructor & Destructor Documentation

◆ CImage() [1/2]

ATL::CImage::CImage ( )
inlinenoexcept

Definition at line 40 of file atlimage.h.

41 {
43 }
void IncreaseCImageCount() noexcept
Definition: atlimage.h:985
static CInitGDIPlus s_gdiplus
Definition: atlimage.h:1003

◆ ~CImage()

virtual ATL::CImage::~CImage ( )
inlinevirtualnoexcept

Definition at line 45 of file atlimage.h.

46 {
47 Destroy();
49 }
void DecreaseCImageCount() noexcept
Definition: atlimage.h:992
void Destroy() noexcept
Definition: atlimage.h:204

◆ CImage() [2/2]

ATL::CImage::CImage ( const CImage )
privatedelete

Member Function Documentation

◆ _getAllDecoders()

static Gdiplus::ImageCodecInfo * ATL::CImage::_getAllDecoders ( UINT cDecoders)
inlinestaticprivate

Definition at line 1104 of file atlimage.h.

1105 {
1106 UINT total_size = 0;
1107 s_gdiplus.GetImageDecodersSize(&cDecoders, &total_size);
1108 if (total_size == 0)
1109 return NULL; // failure
1110
1111 Gdiplus::ImageCodecInfo *ret;
1112 ret = new Gdiplus::ImageCodecInfo[total_size / sizeof(ret[0])];
1113 if (ret == NULL)
1114 {
1115 cDecoders = 0;
1116 return NULL; // failure
1117 }
1118
1119 s_gdiplus.GetImageDecoders(cDecoders, total_size, ret);
1120 return ret; // needs delete[]
1121 }
FUN_GetImageDecoder GetImageDecoders
Definition: atlimage.h:906
FUN_GetImageDecoderSize GetImageDecodersSize
Definition: atlimage.h:907
#define NULL
Definition: types.h:112
unsigned int UINT
Definition: ndis.h:50
int ret

Referenced by GetImporterFilterString().

◆ _getAllEncoders()

static Gdiplus::ImageCodecInfo * ATL::CImage::_getAllEncoders ( UINT cEncoders)
inlinestaticprivate

Definition at line 1085 of file atlimage.h.

1086 {
1087 UINT total_size = 0;
1088 s_gdiplus.GetImageEncodersSize(&cEncoders, &total_size);
1089 if (total_size == 0)
1090 return NULL; // failure
1091
1092 Gdiplus::ImageCodecInfo *ret;
1093 ret = new Gdiplus::ImageCodecInfo[total_size / sizeof(ret[0])];
1094 if (ret == NULL)
1095 {
1096 cEncoders = 0;
1097 return NULL; // failure
1098 }
1099
1100 s_gdiplus.GetImageEncoders(cEncoders, total_size, ret);
1101 return ret; // needs delete[]
1102 }
FUN_GetImageEncoderSize GetImageEncodersSize
Definition: atlimage.h:909
FUN_GetImageEncoder GetImageEncoders
Definition: atlimage.h:908

Referenced by GetExporterFilterString(), and Save().

◆ AlphaBlend() [1/4]

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

Definition at line 146 of file atlimage.h.

148 {
149 return AlphaBlend(hDestDC, pointDest.x, pointDest.y, bSrcAlpha, bBlendOp);
150 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define AlphaBlend
Definition: misc.c:293

◆ AlphaBlend() [2/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 151 of file atlimage.h.

153 {
154 return AlphaBlend(hDestDC, rectDest.left, rectDest.top,
155 rectDest.right - rectDest.left,
156 rectDest.bottom - rectDest.top,
157 rectSrc.left, rectSrc.top,
158 rectSrc.right - rectSrc.left,
159 rectSrc.bottom - rectSrc.top,
160 bSrcAlpha, bBlendOp);
161 }
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

◆ AlphaBlend() [3/4]

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

Definition at line 138 of file atlimage.h.

140 {
141 int width = GetWidth();
142 int height = GetHeight();
143 return AlphaBlend(hDestDC, xDest, yDest, width, height, 0, 0,
144 width, height, bSrcAlpha, bBlendOp);
145 }
int GetHeight() const noexcept
Definition: atlimage.h:293
int GetWidth() const noexcept
Definition: atlimage.h:346
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546

◆ AlphaBlend() [4/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 119 of file atlimage.h.

123 {
125
126 BLENDFUNCTION bf;
127 bf.BlendOp = bBlendOp;
128 bf.BlendFlags = 0;
129 bf.SourceConstantAlpha = bSrcAlpha;
131
132 GetDC();
133 BOOL ret = ::AlphaBlend(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
134 m_hDC, xSrc, ySrc, nSrcWidth, nSrcHeight, bf);
135 ReleaseDC();
136 return ret;
137 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
HDC GetDC() const noexcept
Definition: atlimage.h:80
static BOOL IsTransparencySupported() noexcept
Definition: atlimage.h:686
void ReleaseDC() const noexcept
Definition: atlimage.h:98
unsigned int BOOL
Definition: ntddk_ex.h:94
#define AC_SRC_ALPHA
Definition: alphablend.c:9
BYTE BlendOp
Definition: wingdi.h:2759
BYTE BlendFlags
Definition: wingdi.h:2760
BYTE AlphaFormat
Definition: wingdi.h:2762
BYTE SourceConstantAlpha
Definition: wingdi.h:2761

◆ Attach()

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

Definition at line 61 of file atlimage.h.

62 {
63 AttachInternal(hBitmap, eOrientation, -1);
64 }
void AttachInternal(HBITMAP hBitmap, DIBOrientation eOrientation, LONG iTransColor) noexcept
Definition: atlimage.h:1123
static HBITMAP hBitmap
Definition: timezone.c:26

Referenced by Load(), LoadFromResource(), Test_BitmapEntry(), Test_CompatBitmapEntry(), and Test_DIBSectionEntry().

◆ AttachInternal()

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

Definition at line 1123 of file atlimage.h.

1125 {
1126 Destroy();
1127
1128 DIBSECTION ds;
1129 BITMAP& bm = ds.dsBm;
1130
1131 m_bIsDIBSection = (::GetObjectW(hBitmap, sizeof(ds), &ds) == sizeof(ds));
1132
1133 if (!m_bIsDIBSection && !::GetObjectW(hBitmap, sizeof(bm), &bm))
1134 return;
1135
1137 m_nWidth = bm.bmWidth;
1138 m_nHeight = bm.bmHeight;
1139 m_nBPP = bm.bmBitsPixel;
1140 m_bHasAlphaChannel = (bm.bmBitsPixel == 32);
1142
1143 m_nPitch = 0;
1144 m_pBits = NULL;
1145 if (m_bIsDIBSection)
1146 {
1147 if (eOrientation == DIBOR_DEFAULT)
1148 eOrientation = ((ds.dsBmih.biHeight < 0) ? DIBOR_TOPDOWN : DIBOR_BOTTOMUP);
1149
1150 LPBYTE pb = (LPBYTE)bm.bmBits;
1151 if (eOrientation == DIBOR_BOTTOMUP)
1152 {
1153 m_nPitch = -bm.bmWidthBytes;
1154 m_pBits = pb + bm.bmWidthBytes * (m_nHeight - 1);
1155 }
1156 else
1157 {
1158 m_nPitch = bm.bmWidthBytes;
1159 m_pBits = pb;
1160 }
1161 }
1162 }
INT m_nWidth
Definition: atlimage.h:1013
BOOL m_bIsDIBSection
Definition: atlimage.h:1019
COLORREF m_clrTransparentColor
Definition: atlimage.h:1020
INT m_nPitch
Definition: atlimage.h:1015
HBITMAP m_hBitmap
Definition: atlimage.h:1011
LPVOID m_pBits
Definition: atlimage.h:1017
INT m_nHeight
Definition: atlimage.h:1014
BOOL m_bHasAlphaChannel
Definition: atlimage.h:1018
#define ds
Definition: i386-dis.c:443
if(dx< 0)
Definition: linetemp.h:194
Definition: bl.h:1331
unsigned char * LPBYTE
Definition: typedefs.h:53
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define CLR_INVALID
Definition: wingdi.h:883

Referenced by Attach(), and CreateInternal().

◆ BitBlt() [1/4]

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

Definition at line 179 of file atlimage.h.

181 {
182 return BitBlt(hDestDC, pointDest.x, pointDest.y, dwROP);
183 }
BOOL BitBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, DWORD dwROP=SRCCOPY) const noexcept
Definition: atlimage.h:163

◆ BitBlt() [2/4]

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

Definition at line 184 of file atlimage.h.

186 {
187 return BitBlt(hDestDC, rectDest.left, rectDest.top,
188 rectDest.right - rectDest.left,
189 rectDest.bottom - rectDest.top,
190 pointSrc.x, pointSrc.y, dwROP);
191 }

◆ BitBlt() [3/4]

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

Definition at line 173 of file atlimage.h.

175 {
176 return BitBlt(hDestDC, xDest, yDest,
177 GetWidth(), GetHeight(), 0, 0, dwROP);
178 }

◆ BitBlt() [4/4]

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

Definition at line 163 of file atlimage.h.

166 {
167 GetDC();
168 BOOL ret = ::BitBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
169 m_hDC, xSrc, ySrc, dwROP);
170 ReleaseDC();
171 return ret;
172 }

Referenced by BitBlt().

◆ BuildCodecFilterString()

static HRESULT ATL::CImage::BuildCodecFilterString ( const Gdiplus::ImageCodecInfo *  pCodecs,
UINT  cCodecs,
CSimpleString strFilter,
CSimpleArray< GUID > &  aguidFileTypes,
LPCTSTR  pszAllFilesDescription,
DWORD  dwExclude,
TCHAR  chSeparator 
)
inlinestaticprivate

Definition at line 728 of file atlimage.h.

736 {
737 if (!pCodecs || !cCodecs)
738 {
739 strFilter += chSeparator;
740 return E_FAIL;
741 }
742
743 if (pszAllFilesDescription)
744 {
745 strFilter += pszAllFilesDescription;
746
747 BOOL bFirst = TRUE;
748 CString extensions;
749 for (UINT i = 0; i < cCodecs; ++i)
750 {
751 if (ShouldExcludeFormat(pCodecs[i].FormatID, dwExclude))
752 continue;
753
754 if (bFirst)
755 bFirst = FALSE;
756 else
757 extensions += TEXT(';');
758
759 CString ext(pCodecs[i].FilenameExtension);
760 extensions += ext;
761 }
762
763 strFilter += chSeparator;
764 strFilter += extensions;
765 strFilter += chSeparator;
766
767 aguidFileTypes.Add(GUID_NULL);
768 }
769
770 for (UINT i = 0; i < cCodecs; ++i)
771 {
772 if (ShouldExcludeFormat(pCodecs[i].FormatID, dwExclude))
773 continue;
774
775 CString extensions(pCodecs[i].FilenameExtension);
776
777 CString desc(pCodecs[i].FormatDescription);
778 strFilter += desc;
779 strFilter += TEXT(" (");
780 strFilter += extensions;
781 strFilter += TEXT(")");
782 strFilter += chSeparator;
783 strFilter += extensions;
784 strFilter += chSeparator;
785
786 aguidFileTypes.Add(pCodecs[i].FormatID);
787 }
788
789 strFilter += chSeparator;
790 return S_OK;
791 }
static bool ShouldExcludeFormat(REFGUID guidFileType, DWORD dwExclude)
Definition: atlimage.h:707
#define E_FAIL
Definition: ddrawi.h:102
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR *const ext[]
Definition: module.c:53
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
#define S_OK
Definition: intsafe.h:52
#define TEXT(s)
Definition: k32.h:26
#define GUID_NULL
Definition: ks.h:106
static const WCHAR desc[]
Definition: protectdata.c:36

Referenced by GetExporterFilterString(), and GetImporterFilterString().

◆ Create()

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

Definition at line 193 of file atlimage.h.

194 {
195 return CreateEx(nWidth, nHeight, nBPP, BI_RGB, NULL, dwFlags);
196 }
BOOL CreateEx(int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0) noexcept
Definition: atlimage.h:198
#define BI_RGB
Definition: precomp.h:47
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ CreateEx()

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

Definition at line 198 of file atlimage.h.

200 {
201 return CreateInternal(nWidth, nHeight, nBPP, eCompression, pdwBitmasks, dwFlags);
202 }
BOOL CreateInternal(int nWidth, int nHeight, int nBPP, DWORD eCompression, const DWORD *pdwBitmasks=NULL, DWORD dwFlags=0) noexcept
Definition: atlimage.h:1164

Referenced by Create().

◆ CreateInternal()

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

Definition at line 1164 of file atlimage.h.

1167 {
1168 ATLASSERT(nWidth != 0);
1169 ATLASSERT(nHeight != 0);
1170
1171 // initialize BITMAPINFO extension
1172 MYBITMAPINFOEX bi;
1173 ZeroMemory(&bi, sizeof(bi));
1174 bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
1175 bi.bmiHeader.biWidth = nWidth;
1176 bi.bmiHeader.biHeight = nHeight;
1177 bi.bmiHeader.biPlanes = 1;
1178 bi.bmiHeader.biBitCount = nBPP;
1179 bi.bmiHeader.biCompression = eCompression;
1180
1181 // is there alpha channel?
1182 bool bHasAlphaCh;
1183 bHasAlphaCh = (nBPP == 32 && (dwFlags & createAlphaChannel));
1184
1185 // get orientation
1186 DIBOrientation eOrientation;
1187 eOrientation = ((nHeight > 0) ? DIBOR_BOTTOMUP : DIBOR_TOPDOWN);
1188
1189 // does it have bit fields?
1190 if (eCompression == BI_BITFIELDS)
1191 {
1192 if (nBPP == 16 || nBPP == 32)
1193 {
1194 // store the mask data
1195 LPDWORD pdwMask = reinterpret_cast<LPDWORD>(bi.bmiColors);
1196 pdwMask[0] = pdwBitmasks[0];
1197 pdwMask[1] = pdwBitmasks[1];
1198 pdwMask[2] = pdwBitmasks[2];
1199 }
1200 else
1201 {
1202 return FALSE;
1203 }
1204 }
1205 else
1206 {
1207 ATLASSERT(pdwBitmasks == NULL);
1208 if (pdwBitmasks)
1209 return FALSE;
1210 }
1211
1212 // create a DIB section
1214 ATLASSERT(hDC);
1216 ATLASSERT(hbm);
1217 ::DeleteDC(hDC);
1218
1219 // attach it
1220 AttachInternal(hbm, eOrientation, -1);
1221 m_bHasAlphaChannel = bHasAlphaCh;
1222
1223 return hbm != NULL;
1224 }
static HDC hDC
Definition: 3dtext.c:33
#define BI_BITFIELDS
Definition: mmreg.h:507
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
uint32_t * LPDWORD
Definition: typedefs.h:59
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
#define ZeroMemory
Definition: winbase.h:1700
#define DIB_RGB_COLORS
Definition: wingdi.h:367
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI DeleteDC(_In_ HDC)

Referenced by CreateEx().

◆ Destroy()

void ATL::CImage::Destroy ( )
inlinenoexcept

Definition at line 204 of file atlimage.h.

205 {
206 if (m_hBitmap)
207 {
209 }
210 }
HBITMAP Detach() noexcept
Definition: atlimage.h:66
pKey DeleteObject()

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

◆ Detach()

HBITMAP ATL::CImage::Detach ( )
inlinenoexcept

Definition at line 66 of file atlimage.h.

Referenced by Destroy().

◆ Draw() [1/6]

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

Definition at line 250 of file atlimage.h.

251 {
252 return Draw(hDestDC, pointDest.x, pointDest.y);
253 }
BOOL Draw(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight) const noexcept
Definition: atlimage.h:212

◆ Draw() [2/6]

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

Definition at line 260 of file atlimage.h.

261 {
262 return Draw(hDestDC, rectDest.left, rectDest.top,
263 rectDest.right - rectDest.left,
264 rectDest.bottom - rectDest.top);
265 }

◆ Draw() [3/6]

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

Definition at line 237 of file atlimage.h.

238 {
239 return Draw(hDestDC, rectDest.left, rectDest.top,
240 rectDest.right - rectDest.left,
241 rectDest.bottom - rectDest.top,
242 rectSrc.left, rectSrc.top,
243 rectSrc.right - rectSrc.left,
244 rectSrc.bottom - rectSrc.top);
245 }

◆ Draw() [4/6]

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

Definition at line 246 of file atlimage.h.

247 {
248 return Draw(hDestDC, xDest, yDest, GetWidth(), GetHeight());
249 }

◆ Draw() [5/6]

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

Definition at line 254 of file atlimage.h.

256 {
257 return Draw(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
258 0, 0, GetWidth(), GetHeight());
259 }

◆ Draw() [6/6]

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

Definition at line 212 of file atlimage.h.

214 {
217 {
218 return AlphaBlend(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
219 xSrc, ySrc, nSrcWidth, nSrcHeight);
220 }
222 {
224 if ((m_clrTransparentColor & 0xFF000000) == 0x01000000)
226 else
228 return TransparentBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
229 xSrc, ySrc, nSrcWidth, nSrcHeight, rgb);
230 }
231 else
232 {
233 return StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
234 xSrc, ySrc, nSrcWidth, nSrcHeight);
235 }
236 }
BOOL StretchBlt(HDC hDestDC, int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwROP=SRCCOPY) const noexcept
Definition: atlimage.h:612
COLORREF RGBFromPaletteIndex(int iIndex) const
Definition: atlimage.h:1033
#define TransparentBlt
Definition: misc.c:292
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3521
DWORD COLORREF
Definition: windef.h:300

Referenced by Draw().

◆ FindCodecForExtension()

static CLSID ATL::CImage::FindCodecForExtension ( LPCTSTR  dotext,
const Gdiplus::ImageCodecInfo *  pCodecs,
UINT  nCodecs 
)
inlinestaticprivate

Definition at line 1042 of file atlimage.h.

1043 {
1044 for (UINT i = 0; i < nCodecs; ++i)
1045 {
1046 CString strSpecs(pCodecs[i].FilenameExtension);
1047 int ichOld = 0, ichSep;
1048 for (;;)
1049 {
1050 ichSep = strSpecs.Find(TEXT(';'), ichOld);
1051
1052 CString strSpec;
1053 if (ichSep < 0)
1054 strSpec = strSpecs.Mid(ichOld);
1055 else
1056 strSpec = strSpecs.Mid(ichOld, ichSep - ichOld);
1057
1058 int ichDot = strSpec.ReverseFind(TEXT('.'));
1059 if (ichDot >= 0)
1060 strSpec = strSpec.Mid(ichDot);
1061
1062 if (!dotext || strSpec.CompareNoCase(dotext) == 0)
1063 return pCodecs[i].Clsid;
1064
1065 if (ichSep < 0)
1066 break;
1067
1068 ichOld = ichSep + 1;
1069 }
1070 }
1071 return CLSID_NULL;
1072 }
int CompareNoCase(_In_z_ PCXSTR psz) const
Definition: cstringt.h:743
CStringT Mid(int iFirst, int nCount) const
Definition: cstringt.h:748
int ReverseFind(_In_ XCHAR ch) const
Definition: cstringt.h:730
#define CLSID_NULL
Definition: guiddef.h:99

Referenced by Save().

◆ FindCodecForFileType()

static CLSID ATL::CImage::FindCodecForFileType ( REFGUID  guidFileType,
const Gdiplus::ImageCodecInfo *  pCodecs,
UINT  nCodecs 
)
inlinestaticprivate

Definition at line 1075 of file atlimage.h.

1076 {
1077 for (UINT iInfo = 0; iInfo < nCodecs; ++iInfo)
1078 {
1079 if (::IsEqualGUID(pCodecs[iInfo].FormatID, guidFileType))
1080 return pCodecs[iInfo].Clsid;
1081 }
1082 return CLSID_NULL;
1083 }
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

Referenced by Save().

◆ GetBits() [1/2]

const void * ATL::CImage::GetBits ( ) const
inlinenoexcept

Definition at line 273 of file atlimage.h.

274 {
275 return const_cast<CImage*>(this)->GetBits();
276 }
void * GetBits() noexcept
Definition: atlimage.h:267

◆ GetBits() [2/2]

void * ATL::CImage::GetBits ( )
inlinenoexcept

Definition at line 267 of file atlimage.h.

268 {
270 return m_pBits;
271 }
bool IsDIBSection() const noexcept
Definition: atlimage.h:352

Referenced by GetBits(), GetPixelAddress(), and Test_DIBSectionEntry().

◆ GetBPP()

int ATL::CImage::GetBPP ( ) const
inlinenoexcept

Definition at line 278 of file atlimage.h.

279 {
281 return m_nBPP;
282 }

Referenced by GetPixelAddress(), IsIndexed(), Test_BitmapEntry(), Test_DIBSectionEntry(), and Test_ResBitmap().

◆ GetColorTable()

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

Definition at line 284 of file atlimage.h.

286 {
288 GetDC();
289 ::GetDIBColorTable(m_hDC, iFirstColor, nColors, prgbColors);
290 ReleaseDC();
291 }
UINT WINAPI GetDIBColorTable(HDC hDC, UINT iStartIndex, UINT cEntries, RGBQUAD *pColors)
Definition: palette.c:123

Referenced by RGBFromPaletteIndex(), and Test_DIBSectionEntry().

◆ GetDC()

HDC ATL::CImage::GetDC ( ) const
inlinenoexcept

Definition at line 80 of file atlimage.h.

81 {
84 {
87
90
93 }
94
95 return m_hDC;
96 }
#define InterlockedIncrement
Definition: armddk.h:53
LONG m_nDCRefCount
Definition: atlimage.h:1022
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539

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

◆ GetExporterFilterString()

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

Definition at line 817 of file atlimage.h.

823 {
824 if (!InitGDIPlus())
825 return E_FAIL;
826
827 UINT cEncoders = 0;
828 Gdiplus::ImageCodecInfo* pEncoders = _getAllEncoders(cEncoders);
830 cEncoders,
831 strExporters,
832 aguidFileTypes,
833 pszAllFilesDescription,
834 dwExclude,
835 chSeparator);
836 delete[] pEncoders;
837 return hr;
838 }
static HRESULT BuildCodecFilterString(const Gdiplus::ImageCodecInfo *pCodecs, UINT cCodecs, CSimpleString &strFilter, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription, DWORD dwExclude, TCHAR chSeparator)
Definition: atlimage.h:728
static Gdiplus::ImageCodecInfo * _getAllEncoders(UINT &cEncoders)
Definition: atlimage.h:1085
static bool InitGDIPlus() noexcept
Definition: atlimage.h:1005
HRESULT hr
Definition: shlfolder.c:183

Referenced by CMainWindow::GetSaveFileName(), and Test_Exporter().

◆ GetFileExtension()

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

Definition at line 1024 of file atlimage.h.

1025 {
1027 if (pch == NULL)
1028 pch = wcsrchr(pszFileName, L'/');
1029 pch = (pch ? wcsrchr(pch, L'.') : wcsrchr(pszFileName, L'.'));
1030 return (pch ? pch : (pszFileName + ::lstrlenW(pszFileName)));
1031 }
#define wcsrchr
Definition: compat.h:16
#define lstrlenW
Definition: compat.h:750
#define pch(ap)
Definition: match.c:418
#define L(x)
Definition: ntvdm.h:50
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by Save().

◆ GetHeight()

int ATL::CImage::GetHeight ( ) const
inlinenoexcept

◆ GetImporterFilterString()

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

Definition at line 794 of file atlimage.h.

800 {
801 if (!InitGDIPlus())
802 return E_FAIL;
803
804 UINT cDecoders = 0;
805 Gdiplus::ImageCodecInfo* pDecoders = _getAllDecoders(cDecoders);
807 cDecoders,
808 strImporters,
809 aguidFileTypes,
810 pszAllFilesDescription,
811 dwExclude,
812 chSeparator);
813 delete[] pDecoders;
814 return hr;
815 }
static Gdiplus::ImageCodecInfo * _getAllDecoders(UINT &cDecoders)
Definition: atlimage.h:1104

Referenced by CMainWindow::GetOpenFileName(), and Test_Importer().

◆ GetMaxColorTableEntries()

int ATL::CImage::GetMaxColorTableEntries ( ) const
inlinenoexcept

Definition at line 299 of file atlimage.h.

300 {
302 switch (m_nBPP)
303 {
304 case 1: case 4: case 8:
305 return (1 << m_nBPP);
306
307 case 16: case 24: case 32:
308 default:
309 return 0;
310 }
311 }

Referenced by Test_DIBSectionEntry().

◆ GetPitch()

int ATL::CImage::GetPitch ( ) const
inlinenoexcept

Definition at line 313 of file atlimage.h.

314 {
316 return m_nPitch;
317 }

Referenced by GetPixelAddress(), Test_DIBSectionEntry(), and Test_ResBitmap().

◆ GetPixel()

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

Definition at line 319 of file atlimage.h.

320 {
321 GetDC();
323 ReleaseDC();
324 return ret;
325 }
COLORREF GetPixel(int x, int y) const noexcept
Definition: atlimage.h:319
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Referenced by GetPixel(), and Test_DIBSectionEntry().

◆ GetPixelAddress() [1/2]

const void * ATL::CImage::GetPixelAddress ( int  x,
int  y 
) const
inlinenoexcept

Definition at line 336 of file atlimage.h.

337 {
338 return const_cast<CImage*>(this)->GetPixelAddress(x, y);
339 }
void * GetPixelAddress(int x, int y) noexcept
Definition: atlimage.h:327

◆ GetPixelAddress() [2/2]

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

Definition at line 327 of file atlimage.h.

328 {
330 BYTE *pb = (BYTE *)GetBits();
331 pb += GetPitch() * y;
332 pb += (GetBPP() * x) / 8;
333 return pb;
334 }
int GetBPP() const noexcept
Definition: atlimage.h:278
int GetPitch() const noexcept
Definition: atlimage.h:313
unsigned char BYTE
Definition: xxhash.c:193

Referenced by GetPixelAddress(), and Test_PixelAddress().

◆ GetTransparentColor()

COLORREF ATL::CImage::GetTransparentColor ( ) const
inlinenoexcept

Definition at line 341 of file atlimage.h.

342 {
344 }

Referenced by Test_DIBSectionEntry().

◆ GetWidth()

int ATL::CImage::GetWidth ( ) const
inlinenoexcept

◆ InitGDIPlus()

static bool ATL::CImage::InitGDIPlus ( )
inlinestaticprivatenoexcept

Definition at line 1005 of file atlimage.h.

1006 {
1007 return s_gdiplus.Init();
1008 }
bool Init() noexcept
Definition: atlimage.h:929

Referenced by GetExporterFilterString(), GetImporterFilterString(), Load(), and Save().

◆ IsDIBSection()

bool ATL::CImage::IsDIBSection ( ) const
inlinenoexcept

◆ IsIndexed()

bool ATL::CImage::IsIndexed ( ) const
inlinenoexcept

Definition at line 358 of file atlimage.h.

359 {
361 return GetBPP() <= 8;
362 }

Referenced by SetPixelIndexed().

◆ IsNull()

bool ATL::CImage::IsNull ( ) const
inlinenoexcept

Definition at line 364 of file atlimage.h.

365 {
366 return m_hBitmap == NULL;
367 }

Referenced by Test_BitmapEntry(), Test_CompatBitmapEntry(), Test_DIBSectionEntry(), and Test_ResBitmap().

◆ IsTransparencySupported()

static BOOL ATL::CImage::IsTransparencySupported ( )
inlinestaticnoexcept

Definition at line 686 of file atlimage.h.

687 {
688 return TRUE;
689 }

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

◆ Load() [1/2]

HRESULT ATL::CImage::Load ( IStream pStream)
inlinenoexcept

Definition at line 398 of file atlimage.h.

399 {
400 if (!InitGDIPlus())
401 return E_FAIL;
402
403 // create GpBitmap from stream
404 using namespace Gdiplus;
405 GpBitmap *pBitmap = NULL;
406 if (s_gdiplus.CreateBitmapFromStream(pStream, &pBitmap) != Ok)
407 {
408 return E_FAIL;
409 }
410
411 // get bitmap handle
412 HBITMAP hbm = NULL;
413 Color color(0xFF, 0xFF, 0xFF);
414 Status status = s_gdiplus.CreateHBITMAPFromBitmap(pBitmap, &hbm, color.GetValue());
415
416 // delete Bitmap
417 s_gdiplus.DisposeImage(pBitmap);
418
419 // attach it
420 if (status == Ok)
421 Attach(hbm);
422 return (status == Ok ? S_OK : E_FAIL);
423 }
FUN_DisposeImage DisposeImage
Definition: atlimage.h:905
FUN_CreateHBITMAPFromBitmap CreateHBITMAPFromBitmap
Definition: atlimage.h:904
FUN_CreateBitmapFromStream CreateBitmapFromStream
Definition: atlimage.h:903
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT) noexcept
Definition: atlimage.h:61
Status
Definition: gdiplustypes.h:25
@ Ok
Definition: gdiplustypes.h:26
GLuint color
Definition: glext.h:6243
Definition: ps.c:97

◆ Load() [2/2]

HRESULT ATL::CImage::Load ( LPCTSTR  pszFileName)
inlinenoexcept

Definition at line 369 of file atlimage.h.

370 {
371 if (!InitGDIPlus())
372 return E_FAIL;
373
374 // convert the file name string into Unicode
375 CStringW pszNameW(pszFileName);
376
377 // create a GpBitmap object from file
378 using namespace Gdiplus;
379 GpBitmap *pBitmap = NULL;
380 if (s_gdiplus.CreateBitmapFromFile(pszNameW, &pBitmap) != Ok)
381 {
382 return E_FAIL;
383 }
384
385 // get bitmap handle
386 HBITMAP hbm = NULL;
387 Color color(0xFF, 0xFF, 0xFF);
388 Status status = s_gdiplus.CreateHBITMAPFromBitmap(pBitmap, &hbm, color.GetValue());
389
390 // delete GpBitmap
391 s_gdiplus.DisposeImage(pBitmap);
392
393 // attach it
394 if (status == Ok)
395 Attach(hbm);
396 return (status == Ok ? S_OK : E_FAIL);
397 }
FUN_CreateBitmapFromFile CreateBitmapFromFile
Definition: atlimage.h:901

Referenced by Test_DIBSectionEntry().

◆ LoadFromResource() [1/2]

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

Definition at line 426 of file atlimage.h.

427 {
428 HANDLE hHandle = ::LoadImage(hInstance, pszResourceName,
430 Attach(reinterpret_cast<HBITMAP>(hHandle));
431 }
HINSTANCE hInstance
Definition: charmap.c:19
#define IMAGE_BITMAP
Definition: winuser.h:211
#define LR_CREATEDIBSECTION
Definition: winuser.h:1092
#define LoadImage
Definition: winuser.h:5805

Referenced by LoadFromResource(), and Test_ResBitmap().

◆ LoadFromResource() [2/2]

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

Definition at line 432 of file atlimage.h.

433 {
435 }
void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName) noexcept
Definition: atlimage.h:426
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ MaskBlt() [1/4]

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

Definition at line 464 of file atlimage.h.

466 {
467 return MaskBlt(hDestDC, pointDest.x, pointDest.y, hbmMask, dwROP);
468 }
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 noexcept
Definition: atlimage.h:437

◆ MaskBlt() [2/4]

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

Definition at line 450 of file atlimage.h.

453 {
454 return MaskBlt(hDestDC, rectDest.left, rectDest.top,
455 rectDest.right - rectDest.left, rectDest.bottom - rectDest.top,
456 pointSrc.x, pointSrc.y, hbmMask, pointMask.x, pointMask.y, dwROP);
457 }

◆ MaskBlt() [3/4]

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

Definition at line 458 of file atlimage.h.

460 {
461 return MaskBlt(hDestDC, xDest, yDest, GetWidth(), GetHeight(),
462 0, 0, hbmMask, 0, 0, dwROP);
463 }

◆ MaskBlt() [4/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
inlinenoexcept

Definition at line 437 of file atlimage.h.

441 {
443 GetDC();
444 BOOL ret = ::MaskBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
445 m_hDC, xSrc, ySrc,
446 hbmMask, xMask, yMask, dwROP);
447 ReleaseDC();
448 return ret;
449 }

Referenced by MaskBlt().

◆ operator HBITMAP()

ATL::CImage::operator HBITMAP ( )
inlinenoexcept

Definition at line 51 of file atlimage.h.

52 {
53 return m_hBitmap;
54 }

◆ operator=()

CImage & ATL::CImage::operator= ( const CImage )
privatedelete

◆ PlgBlt() [1/4]

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

Definition at line 489 of file atlimage.h.

491 {
492 return PlgBlt(hDestDC, pPoints, rectSrc.left, rectSrc.top,
493 rectSrc.right - rectSrc.left, rectSrc.bottom - rectSrc.top,
494 hbmMask, pointMask.x, pointMask.y);
495 }
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 noexcept
Definition: atlimage.h:470

◆ PlgBlt() [2/4]

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

Definition at line 496 of file atlimage.h.

498 {
499 POINT pointMask = {0, 0};
500 return PlgBlt(hDestDC, pPoints, rectSrc, hbmMask, pointMask);
501 }

◆ PlgBlt() [3/4]

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

Definition at line 483 of file atlimage.h.

485 {
486 return PlgBlt(hDestDC, pPoints, 0, 0, GetWidth(), GetHeight(),
487 hbmMask);
488 }

◆ PlgBlt() [4/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
inlinenoexcept

Definition at line 470 of file atlimage.h.

474 {
476 GetDC();
477 BOOL ret = ::PlgBlt(hDestDC, pPoints, m_hDC,
478 xSrc, ySrc, nSrcWidth, nSrcHeight,
479 hbmMask, xMask, yMask);
480 ReleaseDC();
481 return ret;
482 }

Referenced by PlgBlt().

◆ ReleaseDC()

void ATL::CImage::ReleaseDC ( ) const
inlinenoexcept

Definition at line 98 of file atlimage.h.

99 {
101
103 return;
104
105 if (m_hOldBitmap)
106 {
107 ATLASSERT(m_hDC != NULL);
110 }
111
112 if (m_hDC)
113 {
115 m_hDC = NULL;
116 }
117 }
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by AlphaBlend(), BitBlt(), GetColorTable(), GetPixel(), MaskBlt(), PlgBlt(), SetColorTable(), SetPixel(), SetPixelIndexed(), StretchBlt(), Test_DIBSectionEntry(), TransparentBlt(), and ATL::CImageDC::~CImageDC().

◆ ReleaseGDIPlus()

static void ATL::CImage::ReleaseGDIPlus ( )
inlinestatic

Definition at line 56 of file atlimage.h.

57 {
59 }
void ReleaseGDIPlus() noexcept
Definition: atlimage.h:966

◆ RGBFromPaletteIndex()

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

Definition at line 1033 of file atlimage.h.

1034 {
1035 RGBQUAD table[256];
1036 GetColorTable(0, 256, table);
1037 RGBQUAD& quad = table[iIndex];
1038 return RGB(quad.rgbRed, quad.rgbGreen, quad.rgbBlue);
1039 }
void GetColorTable(UINT iFirstColor, UINT nColors, RGBQUAD *prgbColors) const noexcept
Definition: atlimage.h:284
#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

Referenced by Draw().

◆ Save() [1/2]

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

Definition at line 503 of file atlimage.h.

504 {
505 if (!InitGDIPlus())
506 return E_FAIL;
507
508 using namespace Gdiplus;
510
511 // Get encoders
512 UINT cEncoders = 0;
513 ImageCodecInfo* pEncoders = _getAllEncoders(cEncoders);
514
515 // Get Codec
516 CLSID clsid = FindCodecForFileType(*guidFileType, pEncoders, cEncoders);
517 delete[] pEncoders;
518
519 // create a GpBitmap from HBITMAP
520 GpBitmap *pBitmap = NULL;
522
523 // save to stream
525 status = s_gdiplus.SaveImageToStream(pBitmap, pStream, &clsid, NULL);
526
527 // destroy GpBitmap
528 s_gdiplus.DisposeImage(pBitmap);
529
530 return (status == Ok ? S_OK : E_FAIL);
531 }
FUN_SaveImageToStream SaveImageToStream
Definition: atlimage.h:911
FUN_CreateBitmapFromHBITMAP CreateBitmapFromHBITMAP
Definition: atlimage.h:902
static CLSID FindCodecForFileType(REFGUID guidFileType, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
Definition: atlimage.h:1075
REFCLSID clsid
Definition: msctf.c:82

Referenced by Test_DIBSectionEntry().

◆ Save() [2/2]

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

Definition at line 533 of file atlimage.h.

535 {
536 if (!InitGDIPlus())
537 return E_FAIL;
538
539 using namespace Gdiplus;
541
542 // convert the file name string into Unicode
543 CStringW pszNameW(pszFileName);
544
545 // Get encoders
546 UINT cEncoders = 0;
547 ImageCodecInfo* pEncoders = _getAllEncoders(cEncoders);
548
549 // if the file type is null, get the file type from extension
550 CLSID clsid;
551 if (::IsEqualGUID(guidFileType, GUID_NULL))
552 {
553 CString strExt(GetFileExtension(pszNameW));
554 clsid = FindCodecForExtension(strExt, pEncoders, cEncoders);
555 }
556 else
557 {
558 clsid = FindCodecForFileType(guidFileType, pEncoders, cEncoders);
559 }
560 delete[] pEncoders;
561
562 // create a GpBitmap from HBITMAP
563 GpBitmap *pBitmap = NULL;
565
566 // save to file
567 Status status = s_gdiplus.SaveImageToFile(pBitmap, pszNameW, &clsid, NULL);
568
569 // destroy GpBitmap
570 s_gdiplus.DisposeImage(pBitmap);
571
572 return (status == Ok ? S_OK : E_FAIL);
573 }
FUN_SaveImageToFile SaveImageToFile
Definition: atlimage.h:910
static CLSID FindCodecForExtension(LPCTSTR dotext, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
Definition: atlimage.h:1042
LPCWSTR GetFileExtension(LPCWSTR pszFileName) const
Definition: atlimage.h:1024

◆ SetColorTable()

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

Definition at line 575 of file atlimage.h.

577 {
579 GetDC();
580 ::SetDIBColorTable(m_hDC, iFirstColor, nColors, prgbColors);
581 ReleaseDC();
582 }
UINT WINAPI SetDIBColorTable(_In_ HDC hdc, _In_ UINT iStart, _In_ UINT cEntries, _In_reads_(cEntries) const RGBQUAD *prgbq)

◆ SetPixel()

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

Definition at line 584 of file atlimage.h.

585 {
586 GetDC();
588 ReleaseDC();
589 }
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)

Referenced by SetPixelRGB(), and Test_DIBSectionEntry().

◆ SetPixelIndexed()

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

Definition at line 591 of file atlimage.h.

592 {
594 GetDC();
595 ::SetPixelV(m_hDC, x, y, PALETTEINDEX(iIndex));
596 ReleaseDC();
597 }
bool IsIndexed() const noexcept
Definition: atlimage.h:358
#define PALETTEINDEX(i)
Definition: wingdi.h:2943

◆ SetPixelRGB()

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

Definition at line 599 of file atlimage.h.

600 {
601 SetPixel(x, y, RGB(r, g, b));
602 }
void SetPixel(int x, int y, COLORREF color) noexcept
Definition: atlimage.h:584
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204

◆ SetTransparentColor()

COLORREF ATL::CImage::SetTransparentColor ( COLORREF  rgbTransparent)
inlinenoexcept

Definition at line 604 of file atlimage.h.

605 {
607 COLORREF rgbOldColor = m_clrTransparentColor;
608 m_clrTransparentColor = rgbTransparent;
609 return rgbOldColor;
610 }

◆ ShouldExcludeFormat()

static bool ATL::CImage::ShouldExcludeFormat ( REFGUID  guidFileType,
DWORD  dwExclude 
)
inlinestaticprivate

Definition at line 707 of file atlimage.h.

708 {
709 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatGIF))
710 return !!(dwExclude & excludeGIF);
711 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatBMP))
712 return !!(dwExclude & excludeBMP);
713 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatEMF))
714 return !!(dwExclude & excludeEMF);
715 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatWMF))
716 return !!(dwExclude & excludeWMF);
717 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatJPEG))
718 return !!(dwExclude & excludeJPEG);
719 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatPNG))
720 return !!(dwExclude & excludePNG);
721 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatTIFF))
722 return !!(dwExclude & excludeTIFF);
723 if (::IsEqualGUID(guidFileType, Gdiplus::ImageFormatIcon))
724 return !!(dwExclude & excludeIcon);
725 return ((dwExclude & excludeOther) == excludeOther);
726 }

Referenced by BuildCodecFilterString().

◆ StretchBlt() [1/4]

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

Definition at line 637 of file atlimage.h.

639 {
640 return StretchBlt(hDestDC, rectDest.left, rectDest.top,
641 rectDest.right - rectDest.left,
642 rectDest.bottom - rectDest.top,
643 rectSrc.left, rectSrc.top,
644 rectSrc.right - rectSrc.left,
645 rectSrc.bottom - rectSrc.top, dwROP);
646 }

◆ StretchBlt() [2/4]

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

Definition at line 630 of file atlimage.h.

632 {
633 return StretchBlt(hDestDC, rectDest.left, rectDest.top,
634 rectDest.right - rectDest.left,
635 rectDest.bottom - rectDest.top, dwROP);
636 }

◆ StretchBlt() [3/4]

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

Definition at line 623 of file atlimage.h.

626 {
627 return StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
628 0, 0, GetWidth(), GetHeight(), dwROP);
629 }

◆ StretchBlt() [4/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
inlinenoexcept

Definition at line 612 of file atlimage.h.

616 {
617 GetDC();
618 BOOL ret = ::StretchBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
619 m_hDC, xSrc, ySrc, nSrcWidth, nSrcHeight, dwROP);
620 ReleaseDC();
621 return ret;
622 }

Referenced by Draw(), and StretchBlt().

◆ TransparentBlt() [1/4]

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

Definition at line 676 of file atlimage.h.

679 {
680 return TransparentBlt(hDestDC, rectDest.left, rectDest.top,
681 rectDest.right - rectDest.left, rectDest.bottom - rectDest.left,
682 rectSrc.left, rectSrc.top, rectSrc.right - rectSrc.left,
683 rectSrc.bottom - rectSrc.top, crTransparent);
684 }

◆ TransparentBlt() [2/4]

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

Definition at line 669 of file atlimage.h.

671 {
672 return TransparentBlt(hDestDC, rectDest.left, rectDest.top,
673 rectDest.right - rectDest.left,
674 rectDest.bottom - rectDest.top, crTransparent);
675 }

◆ TransparentBlt() [3/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
inlinenoexcept

Definition at line 648 of file atlimage.h.

652 {
654 GetDC();
655 BOOL ret = ::TransparentBlt(hDestDC, xDest, yDest,
656 nDestWidth, nDestHeight,
657 m_hDC, xSrc, ySrc,
658 nSrcWidth, nSrcHeight, crTransparent);
659 ReleaseDC();
660 return ret;
661 }

◆ TransparentBlt() [4/4]

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

Definition at line 662 of file atlimage.h.

665 {
666 return TransparentBlt(hDestDC, xDest, yDest, nDestWidth, nDestHeight,
667 0, 0, GetWidth(), GetHeight(), crTransparent);
668 }

Member Data Documentation

◆ m_bHasAlphaChannel

BOOL ATL::CImage::m_bHasAlphaChannel = FALSE
private

Definition at line 1018 of file atlimage.h.

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

◆ m_bIsDIBSection

BOOL ATL::CImage::m_bIsDIBSection = FALSE
private

Definition at line 1019 of file atlimage.h.

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

◆ m_clrTransparentColor

COLORREF ATL::CImage::m_clrTransparentColor = CLR_INVALID
private

Definition at line 1020 of file atlimage.h.

Referenced by AttachInternal(), Detach(), Draw(), GetTransparentColor(), and SetTransparentColor().

◆ m_hBitmap

HBITMAP ATL::CImage::m_hBitmap = NULL
private

◆ m_hDC

◆ m_hOldBitmap

HBITMAP ATL::CImage::m_hOldBitmap = NULL
mutableprivate

Definition at line 1012 of file atlimage.h.

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

◆ m_nBPP

INT ATL::CImage::m_nBPP = 0
private

Definition at line 1016 of file atlimage.h.

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

◆ m_nDCRefCount

LONG ATL::CImage::m_nDCRefCount = 0
mutableprivate

Definition at line 1022 of file atlimage.h.

Referenced by GetDC(), and ReleaseDC().

◆ m_nHeight

INT ATL::CImage::m_nHeight = 0
private

Definition at line 1014 of file atlimage.h.

Referenced by AttachInternal(), Detach(), and GetHeight().

◆ m_nPitch

INT ATL::CImage::m_nPitch = 0
private

Definition at line 1015 of file atlimage.h.

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

◆ m_nWidth

INT ATL::CImage::m_nWidth = 0
private

Definition at line 1013 of file atlimage.h.

Referenced by AttachInternal(), Detach(), and GetWidth().

◆ m_pBits

LPVOID ATL::CImage::m_pBits = NULL
private

Definition at line 1017 of file atlimage.h.

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

◆ s_gdiplus

DECLSPEC_SELECTANY CImage::CInitGDIPlus ATL::CImage::s_gdiplus
staticprivate

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