ReactOS  0.4.13-dev-259-g5ca9c9c
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 <stdlib.h>
15  #include <stdio.h>
16  #include <stdarg.h>
18  int g_tests_failed = 0;
19  void ok_func(const char *file, int line, BOOL value, const char *fmt, ...)
20  {
21  va_list va;
22  va_start(va, fmt);
23  if (!value)
24  {
25  printf("%s (%d): ", file, line);
26  vprintf(fmt, va);
28  }
30  va_end(va);
31  }
32  #undef ok
33  #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__)
34  #define START_TEST(x) int main(void)
35 #endif
36 
37 const TCHAR* szFiles[] = {
38  TEXT("ant.png"),
39  TEXT("ant.tif"),
40  TEXT("ant.gif"),
41  TEXT("ant.jpg"),
42  TEXT("ant.bmp"),
43 };
44 
47 {
48  static TCHAR buffer[MAX_PATH];
50  lstrcat(buffer, TEXT("\\"));
52  return buffer;
53 }
54 
55 static void write_bitmap(HINSTANCE hInst, int id, TCHAR* file)
56 {
57  HRSRC rsrc;
58 
60  ok(rsrc != NULL, "Expected to find an image resource\n");
61  if (rsrc)
62  {
63  void *rsrc_data;
64  HANDLE hfile;
65  BOOL ret;
66  HGLOBAL glob = LoadResource(hInst, rsrc);
67  DWORD rsrc_size = SizeofResource(hInst, rsrc);
68 
69  rsrc_data = LockResource(glob);
70 
72  ok(hfile != INVALID_HANDLE_VALUE, "Unable to open temp file: %lu\n", GetLastError());
73  if (hfile != INVALID_HANDLE_VALUE)
74  {
75  BITMAPFILEHEADER bfh = { 0 };
76  DWORD dwWritten;
77 
78  bfh.bfType = 'MB';
79  bfh.bfSize = rsrc_size + sizeof(BITMAPFILEHEADER);
80  bfh.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
81  bfh.bfReserved1 = bfh.bfReserved2 = 0;
82  ret = WriteFile(hfile, &bfh, sizeof(bfh), &dwWritten, NULL);
83  ok(ret, "Unable to write temp file: %lu\n", GetLastError());
84  ret = WriteFile(hfile, rsrc_data, rsrc_size, &dwWritten, NULL);
85  ok(ret, "Unable to write temp file: %lu\n", GetLastError());
86  CloseHandle(hfile);
87  }
88  UnlockResource(rsrc_data);
89  }
90 }
91 
92 typedef Gdiplus::GpStatus (WINAPI *STARTUP)(ULONG_PTR *, const Gdiplus::GdiplusStartupInput *, Gdiplus::GdiplusStartupOutput *);
97 
100 
106 
107 template <typename TYPE>
108 TYPE AddrOf(const char *name)
109 {
111  return reinterpret_cast<TYPE>(proc);
112 }
113 
114 static void init_gdip()
115 {
116  hinstGdiPlus = ::LoadLibraryA("gdiplus.dll");
117  Startup = AddrOf<STARTUP>("GdiplusStartup");
118  Shutdown = AddrOf<SHUTDOWN>("GdiplusShutdown");
119  CreateBitmapFromFile = AddrOf<CREATEBITMAPFROMFILE>("GdipCreateBitmapFromFile");
120  GetImagePixelFormat = AddrOf<GETPIXELFORMAT>("GdipGetImagePixelFormat");
121  DisposeImage = AddrOf<DISPOSEIMAGE>("GdipDisposeImage");
122 }
123 
124 
125 static void determine_file_bpp(TCHAR* tfile, Gdiplus::PixelFormat expect_pf)
126 {
127  using namespace Gdiplus;
128  GpBitmap *pBitmap = NULL;
129 
130 #ifdef UNICODE
131  WCHAR* file = tfile;
132 #else
134  ::MultiByteToWideChar(CP_ACP, 0, tfile, -1, file, MAX_PATH);
135 #endif
136 
137  if (Startup == NULL)
138  init_gdip();
139 
140  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
141  Startup(&gdiplusToken, &gdiplusStartupInput, NULL);
142 
143 
145  ok(status == Gdiplus::Ok, "Expected status to be %i, was: %i\n", (int)Gdiplus::Ok, (int)status);
146  ok(pBitmap != NULL, "Expected a valid bitmap\n");
147  if (pBitmap)
148  {
149  PixelFormat pf;
150  GetImagePixelFormat(pBitmap, &pf);
151  ok(pf == expect_pf, "Expected PixelFormat to be 0x%x, was: 0x%x\n", (int)expect_pf, (int)pf);
152 
153  DisposeImage(pBitmap);
154  }
156 }
157 
158 
160 {
161  HRESULT hr;
162  TCHAR* file;
163  BOOL bOK;
164  int width, height, bpp;
165  size_t n;
166  CImage image1, image2;
167  COLORREF color;
168  HDC hDC;
169 
170 #if 0
171  width = image1.GetWidth();
172  height = image1.GetHeight();
173  bpp = image1.GetBPP();
174 #endif
175 
178 
179  image1.LoadFromResource(hInst, IDB_ANT);
180  ok(!image1.IsNull(), "Expected image1 is not null\n");
181 
182  width = image1.GetWidth();
183  ok(width == 48, "Expected width to be 48, was: %d\n", width);
184  height = image1.GetHeight();
185  ok(height == 48, "Expected height to be 48, was: %d\n", height);
186  bpp = image1.GetBPP();
187  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
188 
189 
191  ok(!image2.IsNull(), "Expected image2 is not null\n");
192  image2.SetTransparentColor(RGB(255, 255, 255));
193 
194  width = image2.GetWidth();
195  ok(width == 32, "Expected width to be 32, was: %d\n", width);
196  height = image2.GetHeight();
197  ok(height == 32, "Expected height to be 32, was: %d\n", height);
198  bpp = image2.GetBPP();
199  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
200 
201  color = image1.GetPixel(5, 5);
202  ok(color == RGB(166, 202, 240), "Expected color to be 166, 202, 240; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
203 
204  hDC = image1.GetDC();
205  bOK = image2.Draw(hDC, 0, 0);
206  image1.ReleaseDC();
207  ok(bOK != FALSE, "Expected bDraw to be TRUE, was: %d\n", bOK);
208  image2.Destroy();
209 
210  color = image1.GetPixel(5, 5);
211  ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
212 
213  file = file_name(TEXT("ant.bmp"));
215 
216  init_gdip();
217 
219 
220  hr = image2.Load(file);
221  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx\n", hr);
222  ok(!image2.IsNull(), "Expected image1 is not null\n");
223  bOK = DeleteFile(file);
224  ok(bOK, "Expected bOK to be TRUE, was: %d\n", bOK);
225 
226  width = image2.GetWidth();
227  ok(width == 48, "Expected width to be 48, was: %d\n", width);
228  height = image2.GetHeight();
229  ok(height == 48, "Expected height to be 48, was: %d\n", height);
230  bpp = image2.GetBPP();
231  ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
232 
233  for (n = 0; n < _countof(szFiles); ++n)
234  {
235  file = file_name(szFiles[n]);
236  image2.Destroy();
237 
238  if (n == 0)
239  hr = image1.Save(file, Gdiplus::ImageFormatPNG);
240  else
241  hr = image1.Save(file);
242  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
243 
244  bOK = (GetFileAttributes(file) != 0xFFFFFFFF);
245  ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
246 
247  hr = image2.Load(file);
248  ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
249 
250  width = image2.GetWidth();
251  ok(width == 48, "Expected width to be 48, was: %d (for %i)\n", width, n);
252  height = image2.GetHeight();
253  ok(height == 48, "Expected height to be 48, was: %d (for %i)\n", height, n);
254  bpp = image2.GetBPP();
255  if (n == 3)
256  {
257  ok(bpp == 24, "Expected bpp to be 24, was: %d (for %i)\n", bpp, n);
259  }
260  else
261  {
262  ok(bpp == 8, "Expected bpp to be 8, was: %d (for %i)\n", bpp, n);
264  }
265  color = image1.GetPixel(5, 5);
266  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);
267 
268  bOK = DeleteFile(file);
269  ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
270  }
271 
273  CSimpleArray<GUID> aguidFileTypes;
274 #ifdef UNICODE
275  CHAR szBuff[512];
276  const WCHAR *psz;
277 #else
278  const CHAR *psz;
279 #endif
280 
281  CSimpleString strImporters(mgr);
282  aguidFileTypes.RemoveAll();
283  hr = CImage::GetImporterFilterString(strImporters,
284  aguidFileTypes,
285  TEXT("All Image Files"), 0);
286  ok(hr == S_OK, "Expected hr to be S_OK, was: %ld\n", hr);
287  ok(aguidFileTypes.GetSize() == 9, "Expected aguidFileTypes.GetSize() to be 8, was %d.", aguidFileTypes.GetSize());
288  ok(IsEqualGUID(aguidFileTypes[0], GUID_NULL), "Expected aguidFileTypes[0] to be GUID_NULL.\n");
289  ok(IsEqualGUID(aguidFileTypes[1], Gdiplus::ImageFormatBMP), "Expected aguidFileTypes[1] to be Gdiplus::ImageFormatBMP.\n");
290  ok(IsEqualGUID(aguidFileTypes[2], Gdiplus::ImageFormatJPEG), "Expected aguidFileTypes[2] to be Gdiplus::ImageFormatJPEG.\n");
291  ok(IsEqualGUID(aguidFileTypes[3], Gdiplus::ImageFormatGIF), "Expected aguidFileTypes[3] to be Gdiplus::ImageFormatGIF.\n");
292  ok(IsEqualGUID(aguidFileTypes[4], Gdiplus::ImageFormatEMF), "Expected aguidFileTypes[4] to be Gdiplus::ImageFormatEMF.\n");
293  ok(IsEqualGUID(aguidFileTypes[5], Gdiplus::ImageFormatWMF), "Expected aguidFileTypes[5] to be Gdiplus::ImageFormatWMF.\n");
294  ok(IsEqualGUID(aguidFileTypes[6], Gdiplus::ImageFormatTIFF), "Expected aguidFileTypes[6] to be Gdiplus::ImageFormatTIFF.\n");
295  ok(IsEqualGUID(aguidFileTypes[7], Gdiplus::ImageFormatPNG), "Expected aguidFileTypes[7] to be Gdiplus::ImageFormatPNG.\n");
296  ok(IsEqualGUID(aguidFileTypes[8], Gdiplus::ImageFormatIcon), "Expected aguidFileTypes[8] to be Gdiplus::ImageFormatIcon.\n");
297 
298  psz = strImporters.GetString();
299 #ifdef UNICODE
300  WideCharToMultiByte(CP_ACP, 0, psz, -1, szBuff, 512, NULL, NULL);
301  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,
302  "The importer filter string is bad, was: %s\n", szBuff);
303 #else
304  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,
305  "The importer filter string is bad, was: %s\n", psz);
306 #endif
307 
308  CSimpleString strExporters(mgr);
309  aguidFileTypes.RemoveAll();
310  hr = CImage::GetExporterFilterString(strExporters,
311  aguidFileTypes,
312  TEXT("All Image Files"), 0);
313  ok(hr == S_OK, "Expected hr to be S_OK, was: %ld\n", hr);
314  ok(aguidFileTypes.GetSize() == 9, "Expected aguidFileTypes.GetSize() to be 8, was %d.", aguidFileTypes.GetSize());
315  ok(IsEqualGUID(aguidFileTypes[0], GUID_NULL), "Expected aguidFileTypes[0] to be GUID_NULL.\n");
316  ok(IsEqualGUID(aguidFileTypes[1], Gdiplus::ImageFormatBMP), "Expected aguidFileTypes[1] to be Gdiplus::ImageFormatBMP.\n");
317  ok(IsEqualGUID(aguidFileTypes[2], Gdiplus::ImageFormatJPEG), "Expected aguidFileTypes[2] to be Gdiplus::ImageFormatJPEG.\n");
318  ok(IsEqualGUID(aguidFileTypes[3], Gdiplus::ImageFormatGIF), "Expected aguidFileTypes[3] to be Gdiplus::ImageFormatGIF.\n");
319  ok(IsEqualGUID(aguidFileTypes[4], Gdiplus::ImageFormatEMF), "Expected aguidFileTypes[4] to be Gdiplus::ImageFormatEMF.\n");
320  ok(IsEqualGUID(aguidFileTypes[5], Gdiplus::ImageFormatWMF), "Expected aguidFileTypes[5] to be Gdiplus::ImageFormatWMF.\n");
321  ok(IsEqualGUID(aguidFileTypes[6], Gdiplus::ImageFormatTIFF), "Expected aguidFileTypes[6] to be Gdiplus::ImageFormatTIFF.\n");
322  ok(IsEqualGUID(aguidFileTypes[7], Gdiplus::ImageFormatPNG), "Expected aguidFileTypes[7] to be Gdiplus::ImageFormatPNG.\n");
323  ok(IsEqualGUID(aguidFileTypes[8], Gdiplus::ImageFormatIcon), "Expected aguidFileTypes[8] to be Gdiplus::ImageFormatIcon.\n");
324 
325  psz = strExporters.GetString();
326 #ifdef UNICODE
327  WideCharToMultiByte(CP_ACP, 0, psz, -1, szBuff, 512, NULL, NULL);
328  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,
329  "The exporter filter string is bad, was: %s\n", szBuff);
330 #else
331  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,
332  "The exporter filter string is bad, was: %s\n", psz);
333 #endif
334 
335 #ifndef HAVE_APITEST
336  printf("CImage: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed);
337  return g_tests_failed;
338 #endif
339 }
TCHAR * file_name(const TCHAR *file)
Definition: CImage.cpp:46
TYPE AddrOf(const char *name)
Definition: CImage.cpp:108
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:94
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:3607
#define WideCharToMultiByte
Definition: compat.h:101
Gdiplus::GpStatus(WINAPI * STARTUP)(ULONG_PTR *, const Gdiplus::GdiplusStartupInput *, Gdiplus::GdiplusStartupOutput *)
Definition: CImage.cpp:92
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:2913
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)
const TCHAR * szFiles[]
Definition: CImage.cpp:37
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:3578
#define GDIPCONST
Definition: gdiplusflat.h:24
static void determine_file_bpp(TCHAR *tfile, Gdiplus::PixelFormat expect_pf)
Definition: CImage.cpp:125
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:2914
void ReleaseDC() const
Definition: atlimage.h:106
#define va_end(ap)
Definition: acmsvcex.h:90
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:101
#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:96
smooth NULL
Definition: ftsmooth.c:416
static CREATEBITMAPFROMFILE CreateBitmapFromFile
Definition: CImage.cpp:103
Definition: parser.c:48
char * va_list
Definition: acmsvcex.h:78
#define GetTempPath
Definition: winbase.h:3664
#define PixelFormat8bppIndexed
static TCHAR szTempPath[MAX_PATH]
Definition: CImage.cpp:45
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
void ok_func(const char *file, int line, BOOL value, const char *fmt,...)
Definition: CImage.cpp:19
_Check_return_opt_ _CRTIMP int __cdecl vprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
static SHUTDOWN Shutdown
Definition: CImage.cpp:102
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DISPOSEIMAGE DisposeImage
Definition: CImage.cpp:105
LONG HRESULT
Definition: typedefs.h:77
static void write_bitmap(HINSTANCE hInst, int id, TCHAR *file)
Definition: CImage.cpp:55
DWORD COLORREF
Definition: windef.h:285
#define RGB(r, g, b)
Definition: wingdi.h:2918
#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:99
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:95
#define GetFileAttributes
Definition: winbase.h:3629
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:93
#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:3641
IN OUT PVCB OUT PDIRENT OUT PBCB IN BOOLEAN CreateFile
Definition: fatprocs.h:904
TYPE
Definition: eventcreate.c:651
#define lstrcpy
Definition: winbase.h:3688
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
int g_tests_executed
Definition: CImage.cpp:17
#define PixelFormat24bppRGB
char ** glob(const char *v)
Definition: fake.c:36
#define va_start(ap, A)
Definition: acmsvcex.h:91
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:114
int GetBPP() const
Definition: atlimage.h:282
COLORREF GetPixel(int x, int y) const
Definition: atlimage.h:332
Definition: name.c:36
int g_tests_failed
Definition: CImage.cpp:18
#define ULONG_PTR
Definition: config.h:101
#define GetBValue(rgb)
Definition: wingdi.h:2915
#define GetProcAddress(x, y)
Definition: compat.h:410
int GetHeight() const
Definition: atlimage.h:297
#define ok(value,...)
Definition: CImage.cpp:33
DWORD bpp
Definition: surface.c:181
#define IDB_CROSS
Definition: resource.h:6
static HINSTANCE hinstGdiPlus
Definition: CImage.cpp:98
void Destroy()
Definition: atlimage.h:208
static GETPIXELFORMAT GetImagePixelFormat
Definition: CImage.cpp:104
#define RT_BITMAP
Definition: pedump.c:364
#define lstrcat
Definition: winbase.h:3685
Definition: dsound.c:943
int(* FARPROC)()
Definition: compat.h:28
#define START_TEST(x)
Definition: CImage.cpp:34
#define printf
Definition: config.h:203
Definition: fci.c:126
Definition: ps.c:97