#include <atlimagedx.h>
Definition at line 14 of file atlimagedx.h.
◆ FN_BitmapSetResolution
◆ FN_CreateBitmapFromFile
◆ FN_CreateBitmapFromHBITMAP
◆ FN_CreateHBITMAPFromBitmap
◆ FN_DisposeImage
◆ FN_GetImageEncoders
◆ FN_GetImageEncodersSize
◆ FN_GetImageHorizontalResolution
◆ FN_GetImageVerticalResolution
◆ FN_SaveImageToFile
◆ FN_Shutdown
◆ FN_Startup
◆ CImageDx()
Definition at line 20 of file atlimagedx.h.
21 {
23 }
static SHARED * _shared()
◆ ~CImageDx()
◆ _shared()
static SHARED * CImageDx::_shared |
( |
| ) |
|
|
inlinestaticprotected |
◆ Attach()
◆ Detach()
Definition at line 40 of file atlimagedx.h.
41 {
44 return hbmOld;
45 }
◆ FindCodecForExtension()
static CLSID CImageDx::FindCodecForExtension |
( |
LPCWSTR |
dotext, |
|
|
const Gdiplus::ImageCodecInfo * |
pCodecs, |
|
|
UINT |
nCodecs |
|
) |
| |
|
inlinestaticprotected |
Definition at line 303 of file atlimagedx.h.
304 {
305 for (
UINT i = 0;
i < nCodecs; ++
i)
306 {
307 CStringW strSpecs(pCodecs[
i].FilenameExtension);
308 int ichOld = 0, ichSep;
309 for (;;)
310 {
311 ichSep = strSpecs.Find(
L';', ichOld);
312
314 if (ichSep < 0)
315 strSpec = strSpecs.
Mid(ichOld);
316 else
317 strSpec = strSpecs.
Mid(ichOld, ichSep - ichOld);
318
320 if (ichDot >= 0)
321 strSpec = strSpec.
Mid(ichDot);
322
324 return pCodecs[
i].Clsid;
325
326 if (ichSep < 0)
327 break;
328
329 ichOld = ichSep + 1;
330 }
331 }
333 }
int CompareNoCase(_In_z_ PCXSTR psz) const
CStringT Mid(int iFirst, int nCount) const
int ReverseFind(_In_ XCHAR ch) const noexcept
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
Referenced by IsExtensionSupported(), and SaveDx().
◆ FindCodecForFileType()
static CLSID CImageDx::FindCodecForFileType |
( |
REFGUID |
guidFileType, |
|
|
const Gdiplus::ImageCodecInfo * |
pCodecs, |
|
|
UINT |
nCodecs |
|
) |
| |
|
inlinestaticprotected |
Definition at line 337 of file atlimagedx.h.
338 {
339 for (
UINT iInfo = 0; iInfo < nCodecs; ++iInfo)
340 {
342 return pCodecs[iInfo].Clsid;
343 }
345 }
#define IsEqualGUID(rguid1, rguid2)
Referenced by SaveDx().
◆ get_fn()
◆ GetAllEncoders()
static Gdiplus::ImageCodecInfo * CImageDx::GetAllEncoders |
( |
UINT & |
cEncoders | ) |
|
|
inlinestaticprotected |
Definition at line 263 of file atlimagedx.h.
264 {
265 Gdiplus::ImageCodecInfo *
ret =
NULL;
267
268 if (!
get_fn(
_shared()->m_GetImageEncodersSize,
"GdipGetImageEncodersSize") ||
269 !
get_fn(
_shared()->m_GetImageEncoders,
"GdipGetImageEncoders"))
270 {
271 cEncoders = 0;
273 }
274
276 if (total_size == 0)
278
279 ret =
new Gdiplus::ImageCodecInfo[total_size /
sizeof(
ret[0])];
281 {
282 cEncoders = 0;
284 }
285
287
289 }
static bool get_fn(FN_T &fn, const char *name)
FN_GetImageEncoders m_GetImageEncoders
FN_GetImageEncodersSize m_GetImageEncodersSize
Referenced by IsExtensionSupported(), and SaveDx().
◆ GetResolution()
BOOL CImageDx::GetResolution |
( |
Gdiplus::GpImage * |
pImage, |
|
|
float * |
pxDpi, |
|
|
float * |
pyDpi |
|
) |
| |
|
inline |
Definition at line 47 of file atlimagedx.h.
48 {
49 if (!
get_fn(
_shared()->m_GetImageHorizontalResolution,
"GdipGetImageHorizontalResolution") ||
50 !
get_fn(
_shared()->m_GetImageVerticalResolution,
"GdipGetImageVerticalResolution"))
51 {
53 }
54
55 if (pxDpi)
57 if (pyDpi)
59
61 }
FN_GetImageHorizontalResolution m_GetImageHorizontalResolution
FN_GetImageVerticalResolution m_GetImageVerticalResolution
Referenced by LoadDx().
◆ IsExtensionSupported()
static BOOL CImageDx::IsExtensionSupported |
( |
PWCHAR |
pchDotExt | ) |
|
|
inlinestatic |
Definition at line 165 of file atlimagedx.h.
166 {
168
171
174 delete[] pEncoders;
175
178 }
static Gdiplus::ImageCodecInfo * GetAllEncoders(UINT &cEncoders)
static CLSID FindCodecForExtension(LPCWSTR dotext, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
Referenced by CMainWindow::saveImage().
◆ LoadDx()
Definition at line 72 of file atlimagedx.h.
73 {
74 using namespace Gdiplus;
75
77
78 if (!
get_fn(
_shared()->m_CreateBitmapFromFile,
"GdipCreateBitmapFromFile") ||
79 !
get_fn(
_shared()->m_CreateHBITMAPFromBitmap,
"GdipCreateHBITMAPFromBitmap") ||
81 {
84 }
85
86
89 {
92 }
93
94
98
99
100 if (pxDpi || pyDpi)
102
103
105
106
109
112 }
BOOL GetResolution(Gdiplus::GpImage *pImage, float *pxDpi, float *pyDpi)
FN_DisposeImage m_DisposeImage
FN_CreateHBITMAPFromBitmap m_CreateHBITMAPFromBitmap
WORD WORD PSZ PSZ pszFileName
◆ SaveDx()
Definition at line 114 of file atlimagedx.h.
116 {
117 using namespace Gdiplus;
118
120
121 if (!
get_fn(
_shared()->m_CreateBitmapFromHBITMAP,
"GdipCreateBitmapFromHBITMAP") ||
122 !
get_fn(
_shared()->m_SaveImageToFile,
"GdipSaveImageToFile") ||
124 {
127 }
128
129
132
133
135
136
139
140
143 {
146 }
147 else
148 {
150 }
151
152 delete[] pEncoders;
153
154
156
157
159
161
163 }
static CLSID FindCodecForFileType(REFGUID guidFileType, const Gdiplus::ImageCodecInfo *pCodecs, UINT nCodecs)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
FN_CreateBitmapFromHBITMAP m_CreateBitmapFromHBITMAP
FN_SaveImageToFile m_SaveImageToFile
_In_ BOOLEAN SetResolution
◆ SetResolution()
BOOL CImageDx::SetResolution |
( |
Gdiplus::GpBitmap * |
pBitmap, |
|
|
float |
xDpi, |
|
|
float |
yDpi |
|
) |
| |
|
inline |
Definition at line 63 of file atlimagedx.h.
64 {
65 if (!
get_fn(
_shared()->m_BitmapSetResolution,
"GdipBitmapSetResolution"))
67
70 }
FN_BitmapSetResolution m_BitmapSetResolution
◆ m_hBitmap
The documentation for this class was generated from the following file: