ReactOS  0.4.14-dev-55-g2da92ac
CImage.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Test for CImage
5  * PROGRAMMER: Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6  */
7 
8 #include <atlimage.h>
9 #include "resource.h"
10 
11 #ifdef HAVE_APITEST
12  #include <apitest.h>
13 #else
14  #include "atltest.h"
15 #endif
16 
17 const TCHAR* szFiles[] = {
18  TEXT("ant.png"),
19  TEXT("ant.tif"),
20  TEXT("ant.gif"),
21  TEXT("ant.jpg"),
22  TEXT("ant.bmp"),
23 };
24 
27 {
28  static TCHAR buffer[MAX_PATH];
30  lstrcat(buffer, TEXT("\\"));
32  return buffer;
33 }
34 
35 static void write_bitmap(HINSTANCE hInst, int id, TCHAR* file)
36 {
37  HRSRC rsrc;
38 
40  ok(rsrc != NULL, "Expected to find an image resource\n");
41  if (rsrc)
42  {
43  void *rsrc_data;
44  HANDLE hfile;
45  BOOL ret;
46  HGLOBAL glob = LoadResource(hInst, rsrc);
47  DWORD rsrc_size = SizeofResource(hInst, rsrc);
48 
49  rsrc_data = LockResource(glob);
50 
52  ok(hfile != INVALID_HANDLE_VALUE, "Unable to open temp file: %lu\n", GetLastError());
53  if (hfile != INVALID_HANDLE_VALUE)
54  {
55  BITMAPFILEHEADER bfh = { 0 };
56  DWORD dwWritten;
57 
58  bfh.bfType = 'MB';
59  bfh.bfSize = rsrc_size + sizeof(BITMAPFILEHEADER);
60  bfh.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
61  bfh.bfReserved1 = bfh.bfReserved2 = 0;
62  ret = WriteFile(hfile, &bfh, sizeof(bfh), &dwWritten, NULL);
63  ok(ret, "Unable to write temp file: %lu\n", GetLastError());
64  ret = WriteFile(hfile, rsrc_data, rsrc_size, &dwWritten, NULL);
65  ok(ret, "Unable to write temp file: %lu\n", GetLastError());
66  CloseHandle(hfile);
67  }
68  UnlockResource(rsrc_data);
69  }
70 }
71 
72 typedef Gdiplus::GpStatus (WINAPI *STARTUP)(ULONG_PTR *, const Gdiplus::GdiplusStartupInput *, Gdiplus::GdiplusStartupOutput *);
77 
80 
86 
87 template <typename TYPE>
88 TYPE AddrOf(const char *name)
89 {
91  return reinterpret_cast<TYPE>(proc);
92 }
93 
94 static void init_gdip()
95 {
96  hinstGdiPlus = ::LoadLibraryA("gdiplus.dll");
97  Startup = AddrOf<STARTUP>("GdiplusStartup");
98  Shutdown = AddrOf<SHUTDOWN>("GdiplusShutdown");
99  CreateBitmapFromFile = AddrOf<CREATEBITMAPFROMFILE>("GdipCreateBitmapFromFile");
100  GetImagePixelFormat = AddrOf<GETPIXELFORMAT>("GdipGetImagePixelFormat");
101  DisposeImage = AddrOf<DISPOSEIMAGE>("GdipDisposeImage");
102 }
103 
104 
105 static void determine_file_bpp(TCHAR* tfile, Gdiplus::PixelFormat expect_pf)
106 {
107  using namespace Gdiplus;
108  GpBitmap *pBitmap = NULL;
109 
110 #ifdef UNICODE
111  WCHAR* file = tfile;
112 #else
114  ::MultiByteToWideChar(CP_ACP, 0, tfile, -1, file, MAX_PATH);
115 #endif
116 
117  if (Startup == NULL)
118  init_gdip();
119 
120  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
121  Startup(&gdiplusToken, &gdiplusStartupInput, NULL);
122 
123 
125  ok(status == Gdiplus::Ok, "Expected status to be %i, was: %i\n", (int)Gdiplus::Ok, (int)status);
126  ok(pBitmap != NULL, "Expected a valid bitmap\n");
127  if (pBitmap)
128  {
129  PixelFormat pf;
130  GetImagePixelFormat(pBitmap, &pf);
131  ok(pf == expect_pf, "Expected PixelFormat to be 0x%x, was: 0x%x\n", (int)expect_pf, (int)pf);
132 
133  DisposeImage(pBitmap);
134  }
136 }
137 
138 
140 {
141  HRESULT hr;
142  TCHAR* file;
143  BOOL bOK;
144  int width, height, bpp;
145  size_t n;
146  CImage image1, image2;
147  COLORREF color;
148  HDC hDC;
149 
150 #if 0
151  width = image1.GetWidth();
152  height = image1.GetHeight();
153  bpp = image1.GetBPP();
154 #endif
155 
158 
159  image1.LoadFromResource(hInst, IDB_ANT);
160  ok(!image1.IsNull(), "Expected image1 is not null\n");
161 
162  width = image1.GetWidth();
163  ok(width == 48, "Expected width to be 48, was: %d\n", width);
164  height = image1.GetHeight();
165  ok(height == 48, "Expected height to be 48, was: %d\n", height);
166  bpp = image1.GetBPP();
167  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
168 
169 
171  ok(!image2.IsNull(), "Expected image2 is not null\n");
172  image2.SetTransparentColor(RGB(255, 255, 255));
173 
174  width = image2.GetWidth();
175  ok(width == 32, "Expected width to be 32, was: %d\n", width);
176  height = image2.GetHeight();
177  ok(height == 32, "Expected height to be 32, was: %d\n", height);
178  bpp = image2.GetBPP();
179  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
180 
181  color = image1.GetPixel(5, 5);
182  ok(color == RGB(166, 202, 240), "Expected color to be 166, 202, 240; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
183 
184  hDC = image1.GetDC();
185  bOK = image2.Draw(hDC, 0, 0);
186  image1.ReleaseDC();
187  ok(bOK != FALSE, "Expected bDraw to be TRUE, was: %d\n", bOK);
188  image2.Destroy();
189 
190  color = image1.GetPixel(5, 5);
191  ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
192 
193  file = file_name(TEXT("ant.bmp"));
195 
196  init_gdip();
197 
199 
200  hr = image2.Load(file);
201  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx\n", hr);
202  ok(!image2.IsNull(), "Expected image1 is not null\n");
203  bOK = DeleteFile(file);
204  ok(bOK, "Expected bOK to be TRUE, was: %d\n", bOK);
205 
206  width = image2.GetWidth();
207  ok(width == 48, "Expected width to be 48, was: %d\n", width);
208  height = image2.GetHeight();
209  ok(height == 48, "Expected height to be 48, was: %d\n", height);
210  bpp = image2.GetBPP();
211  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
212 
213  for (n = 0; n < _countof(szFiles); ++n)
214  {
215  file = file_name(szFiles[n]);
216  image2.Destroy();
217 
218  if (n == 0)
219  hr = image1.Save(file, Gdiplus::ImageFormatPNG);
220  else
221  hr = image1.Save(file);
222  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
223 
224  bOK = (GetFileAttributes(file) != 0xFFFFFFFF);
225  ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
226 
227  hr = image2.Load(file);
228  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
229 
230  width = image2.GetWidth();
231  ok(width == 48, "Expected width to be 48, was: %d (for %i)\n", width, n);
232  height = image2.GetHeight();
233  ok(height == 48, "Expected height to be 48, was: %d (for %i)\n", height, n);
234  bpp = image2.GetBPP();
235  if (n == 3)
236  {
237  ok(bpp == 24, "Expected bpp to be 24, was: %d (for %i)\n", bpp, n);
239  }
240  else
241  {
242  ok(bpp == 8, "Expected bpp to be 8, was: %d (for %i)\n", bpp, n);
244  }
245  color = image1.GetPixel(5, 5);
246  ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i (for %i)\n", GetRValue(color), GetGValue(color), GetBValue(color), n);
247 
248  bOK = DeleteFile(file);
249  ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
250  }
251 
253  CSimpleArray<GUID> aguidFileTypes;
254 #ifdef UNICODE
255  CHAR szBuff[512];
256  const WCHAR *psz;
257 #else
258  const CHAR *psz;
259 #endif
260 
261  CSimpleString strImporters(mgr);
262  aguidFileTypes.RemoveAll();
263  hr = CImage::GetImporterFilterString(strImporters,
264  aguidFileTypes,
265  TEXT("All Image Files"), 0);
266  ok(hr == S_OK, "Expected hr to be S_OK, was: %ld\n", hr);
267  ok(aguidFileTypes.GetSize() == 9, "Expected aguidFileTypes.GetSize() to be 8, was %d.", aguidFileTypes.GetSize());
268  ok(IsEqualGUID(aguidFileTypes[0], GUID_NULL), "Expected aguidFileTypes[0] to be GUID_NULL.\n");
269  ok(IsEqualGUID(aguidFileTypes[1], Gdiplus::ImageFormatBMP), "Expected aguidFileTypes[1] to be Gdiplus::ImageFormatBMP.\n");
270  ok(IsEqualGUID(aguidFileTypes[2], Gdiplus::ImageFormatJPEG), "Expected aguidFileTypes[2] to be Gdiplus::ImageFormatJPEG.\n");
271  ok(IsEqualGUID(aguidFileTypes[3], Gdiplus::ImageFormatGIF), "Expected aguidFileTypes[3] to be Gdiplus::ImageFormatGIF.\n");
272  ok(IsEqualGUID(aguidFileTypes[4], Gdiplus::ImageFormatEMF), "Expected aguidFileTypes[4] to be Gdiplus::ImageFormatEMF.\n");
273  ok(IsEqualGUID(aguidFileTypes[5], Gdiplus::ImageFormatWMF), "Expected aguidFileTypes[5] to be Gdiplus::ImageFormatWMF.\n");
274  ok(IsEqualGUID(aguidFileTypes[6], Gdiplus::ImageFormatTIFF), "Expected aguidFileTypes[6] to be Gdiplus::ImageFormatTIFF.\n");
275  ok(IsEqualGUID(aguidFileTypes[7], Gdiplus::ImageFormatPNG), "Expected aguidFileTypes[7] to be Gdiplus::ImageFormatPNG.\n");
276  ok(IsEqualGUID(aguidFileTypes[8], Gdiplus::ImageFormatIcon), "Expected aguidFileTypes[8] to be Gdiplus::ImageFormatIcon.\n");
277 
278  psz = strImporters.GetString();
279 #ifdef UNICODE
280  WideCharToMultiByte(CP_ACP, 0, psz, -1, szBuff, 512, NULL, NULL);
281  ok(lstrcmpA(szBuff, "All Image Files|*.BMP;*.DIB;*.RLE;*.JPG;*.JPEG;*.JPE;*.JFIF;*.GIF;*.EMF;*.WMF;*.TIF;*.TIFF;*.PNG;*.ICO|BMP (*.BMP;*.DIB;*.RLE)|*.BMP;*.DIB;*.RLE|JPEG (*.JPG;*.JPEG;*.JPE;*.JFIF)|*.JPG;*.JPEG;*.JPE;*.JFIF|GIF (*.GIF)|*.GIF|EMF (*.EMF)|*.EMF|WMF (*.WMF)|*.WMF|TIFF (*.TIF;*.TIFF)|*.TIF;*.TIFF|PNG (*.PNG)|*.PNG|ICO (*.ICO)|*.ICO||") == 0,
282  "The importer filter string is bad, was: %s\n", szBuff);
283 #else
284  ok(lstrcmpA(psz, "All Image Files|*.BMP;*.DIB;*.RLE;*.JPG;*.JPEG;*.JPE;*.JFIF;*.GIF;*.EMF;*.WMF;*.TIF;*.TIFF;*.PNG;*.ICO|BMP (*.BMP;*.DIB;*.RLE)|*.BMP;*.DIB;*.RLE|JPEG (*.JPG;*.JPEG;*.JPE;*.JFIF)|*.JPG;*.JPEG;*.JPE;*.JFIF|GIF (*.GIF)|*.GIF|EMF (*.EMF)|*.EMF|WMF (*.WMF)|*.WMF|TIFF (*.TIF;*.TIFF)|*.TIF;*.TIFF|PNG (*.PNG)|*.PNG|ICO (*.ICO)|*.ICO||") == 0,
285  "The importer filter string is bad, was: %s\n", psz);
286 #endif
287 
288  CSimpleString strExporters(mgr);
289  aguidFileTypes.RemoveAll();
290  hr = CImage::GetExporterFilterString(strExporters,
291  aguidFileTypes,
292  TEXT("All Image Files"), 0);
293  ok(hr == S_OK, "Expected hr to be S_OK, was: %ld\n", hr);
294  ok(aguidFileTypes.GetSize() == 9, "Expected aguidFileTypes.GetSize() to be 8, was %d.", aguidFileTypes.GetSize());
295  ok(IsEqualGUID(aguidFileTypes[0], GUID_NULL), "Expected aguidFileTypes[0] to be GUID_NULL.\n");
296  ok(IsEqualGUID(aguidFileTypes[1], Gdiplus::ImageFormatBMP), "Expected aguidFileTypes[1] to be Gdiplus::ImageFormatBMP.\n");
297  ok(IsEqualGUID(aguidFileTypes[2], Gdiplus::ImageFormatJPEG), "Expected aguidFileTypes[2] to be Gdiplus::ImageFormatJPEG.\n");
298  ok(IsEqualGUID(aguidFileTypes[3], Gdiplus::ImageFormatGIF), "Expected aguidFileTypes[3] to be Gdiplus::ImageFormatGIF.\n");
299  ok(IsEqualGUID(aguidFileTypes[4], Gdiplus::ImageFormatEMF), "Expected aguidFileTypes[4] to be Gdiplus::ImageFormatEMF.\n");
300  ok(IsEqualGUID(aguidFileTypes[5], Gdiplus::ImageFormatWMF), "Expected aguidFileTypes[5] to be Gdiplus::ImageFormatWMF.\n");
301  ok(IsEqualGUID(aguidFileTypes[6], Gdiplus::ImageFormatTIFF), "Expected aguidFileTypes[6] to be Gdiplus::ImageFormatTIFF.\n");
302  ok(IsEqualGUID(aguidFileTypes[7], Gdiplus::ImageFormatPNG), "Expected aguidFileTypes[7] to be Gdiplus::ImageFormatPNG.\n");
303  ok(IsEqualGUID(aguidFileTypes[8], Gdiplus::ImageFormatIcon), "Expected aguidFileTypes[8] to be Gdiplus::ImageFormatIcon.\n");
304 
305  psz = strExporters.GetString();
306 #ifdef UNICODE
307  WideCharToMultiByte(CP_ACP, 0, psz, -1, szBuff, 512, NULL, NULL);
308  ok(lstrcmpA(szBuff, "All Image Files|*.BMP;*.DIB;*.RLE;*.JPG;*.JPEG;*.JPE;*.JFIF;*.GIF;*.EMF;*.WMF;*.TIF;*.TIFF;*.PNG;*.ICO|BMP (*.BMP;*.DIB;*.RLE)|*.BMP;*.DIB;*.RLE|JPEG (*.JPG;*.JPEG;*.JPE;*.JFIF)|*.JPG;*.JPEG;*.JPE;*.JFIF|GIF (*.GIF)|*.GIF|EMF (*.EMF)|*.EMF|WMF (*.WMF)|*.WMF|TIFF (*.TIF;*.TIFF)|*.TIF;*.TIFF|PNG (*.PNG)|*.PNG|ICO (*.ICO)|*.ICO||") == 0,
309  "The exporter filter string is bad, was: %s\n", szBuff);
310 #else
311  ok(lstrcmpA(psz, "All Image Files|*.BMP;*.DIB;*.RLE;*.JPG;*.JPEG;*.JPE;*.JFIF;*.GIF;*.EMF;*.WMF;*.TIF;*.TIFF;*.PNG;*.ICO|BMP (*.BMP;*.DIB;*.RLE)|*.BMP;*.DIB;*.RLE|JPEG (*.JPG;*.JPEG;*.JPE;*.JFIF)|*.JPG;*.JPEG;*.JPE;*.JFIF|GIF (*.GIF)|*.GIF|EMF (*.EMF)|*.EMF|WMF (*.WMF)|*.WMF|TIFF (*.TIF;*.TIFF)|*.TIF;*.TIFF|PNG (*.PNG)|*.PNG|ICO (*.ICO)|*.ICO||") == 0,
312  "The exporter filter string is bad, was: %s\n", psz);
313 #endif
314 }
TCHAR * file_name(const TCHAR *file)
Definition: CImage.cpp:26
TYPE AddrOf(const char *name)
Definition: CImage.cpp:88
GLeglImageOES image
Definition: gl.h:2204
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define MAKEINTRESOURCE
Definition: winuser.h:591
GLint GLint GLsizei width
Definition: gl.h:1546
Status GpStatus
#define CloseHandle
Definition: compat.h:398
Gdiplus::GpStatus(WINGDIPAPI * CREATEBITMAPFROMFILE)(GDIPCONST WCHAR *, Gdiplus::GpBitmap **)
Definition: CImage.cpp:74
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define FindResource
Definition: winbase.h:3610
#define WideCharToMultiByte
Definition: compat.h:101
Gdiplus::GpStatus(WINAPI * STARTUP)(ULONG_PTR *, const Gdiplus::GdiplusStartupInput *, Gdiplus::GdiplusStartupOutput *)
Definition: CImage.cpp:72
HRESULT hr
Definition: shlfolder.c:183
#define CP_ACP
Definition: compat.h:99
#define _countof(array)
Definition: fontsub.cpp:30
struct GpBitmap GpBitmap
char CHAR
Definition: xmlstorage.h:175
static HDC
Definition: imagelist.c:92
#define GetRValue(rgb)
Definition: wingdi.h:2930
GLdouble n
Definition: glext.h:7729
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
GLuint buffer
Definition: glext.h:5915
VOID WINAPI GetInstance(LPSPropValue, LPSPropValue, ULONG)
START_TEST(CImage)
Definition: CImage.cpp:139
const TCHAR * szFiles[]
Definition: CImage.cpp:17
static HANDLE proc()
Definition: pdb.c:32
void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName)
Definition: atlimage.h:439
HRESULT Load(LPCTSTR pszFileName)
Definition: atlimage.h:377
#define DeleteFile
Definition: winbase.h:3581
#define GDIPCONST
Definition: gdiplusflat.h:24
static void determine_file_bpp(TCHAR *tfile, Gdiplus::PixelFormat expect_pf)
Definition: CImage.cpp:105
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define IDB_ANT
Definition: resource.h:5
#define UnlockResource(h)
Definition: winbase.h:3189
uint32_t ULONG_PTR
Definition: typedefs.h:63
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
#define GetGValue(rgb)
Definition: wingdi.h:2931
void ReleaseDC() const
Definition: atlimage.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint color
Definition: glext.h:6243
#define GENERIC_WRITE
Definition: nt_native.h:90
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
static STARTUP Startup
Definition: CImage.cpp:81
#define WINGDIPAPI
Definition: gdiplusflat.h:22
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
Gdiplus::GpStatus(WINGDIPAPI * DISPOSEIMAGE)(Gdiplus::GpImage *)
Definition: CImage.cpp:76
smooth NULL
Definition: ftsmooth.c:416
static CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: CImage.cpp:83
#define GetTempPath
Definition: winbase.h:3667
#define PixelFormat8bppIndexed
static TCHAR szTempPath[MAX_PATH]
Definition: CImage.cpp:25
bool IsNull() const
Definition: atlimage.h:372
char TCHAR
Definition: xmlstorage.h:189
COLORREF SetTransparentColor(COLORREF rgbTransparent)
Definition: atlimage.h:623
HRESULT Save(IStream *pStream, GUID *guidFileType) const
Definition: atlimage.h:526
static SHUTDOWN Shutdown
Definition: CImage.cpp:82
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DISPOSEIMAGE DisposeImage
Definition: CImage.cpp:85
LONG HRESULT
Definition: typedefs.h:77
static void write_bitmap(HINSTANCE hInst, int id, TCHAR *file)
Definition: CImage.cpp:35
DWORD COLORREF
Definition: windef.h:285
#define RGB(r, g, b)
Definition: wingdi.h:2935
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
const char file[]
Definition: icontest.c:11
PCXSTR GetString() const
Definition: atlsimpstr.h:361
unsigned long DWORD
Definition: ntddk_ex.h:95
int GetWidth() const
Definition: atlimage.h:354
struct GpImage GpImage
static ULONG_PTR gdiplusToken
Definition: CImage.cpp:79
int ret
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
INT PixelFormat
#define GUID_NULL
Definition: ks.h:106
Gdiplus::GpStatus(WINGDIPAPI * GETPIXELFORMAT)(Gdiplus::GpImage *image, Gdiplus::PixelFormat *format)
Definition: CImage.cpp:75
#define GetFileAttributes
Definition: winbase.h:3632
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
HDC GetDC() const
Definition: atlimage.h:96
static HDC hDC
Definition: 3dtext.c:33
void(WINAPI * SHUTDOWN)(ULONG_PTR)
Definition: CImage.cpp:73
#define S_OK
Definition: intsafe.h:59
#define CREATE_ALWAYS
Definition: disk.h:72
HINSTANCE hInst
Definition: dxdiag.c:13
#define TEXT(s)
Definition: k32.h:26
#define GetModuleHandle
Definition: winbase.h:3644
IN OUT PVCB OUT PDIRENT OUT PBCB IN BOOLEAN CreateFile
Definition: fatprocs.h:904
TYPE
Definition: eventcreate.c:651
#define lstrcpy
Definition: winbase.h:3691
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
#define ok(value,...)
Definition: atltest.h:57
#define PixelFormat24bppRGB
char ** glob(const char *v)
Definition: fake.c:36
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
#define MultiByteToWideChar
Definition: compat.h:100
static void init_gdip()
Definition: CImage.cpp:94
int GetBPP() const
Definition: atlimage.h:282
COLORREF GetPixel(int x, int y) const
Definition: atlimage.h:332
Definition: name.c:36
#define ULONG_PTR
Definition: config.h:101
#define GetBValue(rgb)
Definition: wingdi.h:2932
#define GetProcAddress(x, y)
Definition: compat.h:410
int GetHeight() const
Definition: atlimage.h:297
DWORD bpp
Definition: surface.c:181
#define IDB_CROSS
Definition: resource.h:6
static HINSTANCE hinstGdiPlus
Definition: CImage.cpp:78
void Destroy()
Definition: atlimage.h:208
static GETPIXELFORMAT GetImagePixelFormat
Definition: CImage.cpp:84
#define RT_BITMAP
Definition: pedump.c:364
#define lstrcat
Definition: winbase.h:3688
int(* FARPROC)()
Definition: compat.h:28
Definition: fci.c:126
Definition: ps.c:97