29 pb += bm.bmWidthBytes *
y;
31 pb += bm.bmWidthBytes * (bm.bmHeight -
y - 1);
33 pb += (
x * bm.bmBitsPixel) / 8;
151 INT pitch = (bTopDown ? bm.bmWidthBytes : -bm.bmWidthBytes);
159 ok(!image1.
IsNull(),
"Line %d: IsNull() was FALSE\n",
iLine);
195 pbBits += bm.bmWidthBytes * (
height - 1);
256 for (
UINT iDotExt = 0; iDotExt <
_countof(dotexts); ++iDotExt)
260 hr = image1.
Save(szFileName);
264 hr = image2.
Load(szFileName);
329 for (
INT i = 0;
i < guids.GetSize(); ++
i)
346 return (iFilter + 1) / 2;
361 INT iNULL, iBMP, iJPEG, iGIF, iPNG, iTIFF, iEMF, iWMF;
365 aguidFileTypes.RemoveAll();
367 ok(
hr ==
S_OK,
"Expected hr to be S_OK, was: %ld\n",
hr);
368 ok(aguidFileTypes.GetSize() >= 8,
369 "Expected aguidFileTypes.GetSize() to be >= 8, was %d.", aguidFileTypes.GetSize());
372 iBMP =
FindGUID(Gdiplus::ImageFormatBMP, aguidFileTypes);
373 iJPEG =
FindGUID(Gdiplus::ImageFormatJPEG, aguidFileTypes);
374 iGIF =
FindGUID(Gdiplus::ImageFormatGIF, aguidFileTypes);
375 iPNG =
FindGUID(Gdiplus::ImageFormatPNG, aguidFileTypes);
376 iTIFF =
FindGUID(Gdiplus::ImageFormatTIFF, aguidFileTypes);
377 iEMF =
FindGUID(Gdiplus::ImageFormatEMF, aguidFileTypes);
378 iWMF =
FindGUID(Gdiplus::ImageFormatWMF, aguidFileTypes);
381 ok(iBMP > 0,
"iBMP was %d\n", iBMP);
382 ok(iJPEG > 0,
"iJPEG was %d\n", iJPEG);
383 ok(iGIF > 0,
"iGIF was %d\n", iGIF);
384 ok(iPNG > 0,
"iPNG was %d\n", iPNG);
385 ok(iTIFF > 0,
"iTIFF was %d\n", iTIFF);
386 ok(iEMF > 0,
"iEMF was %d\n", iEMF);
387 ok(iWMF > 0,
"iWMF was %d\n", iWMF);
397 aguidFileTypes.RemoveAll();
398 strImporters.
Empty();
400 ok(
hr ==
S_OK,
"Expected hr to be S_OK, was: %ld\n",
hr);
401 ok(aguidFileTypes.GetSize() >= 7,
402 "Expected aguidFileTypes.GetSize() to be >= 7, was %d.", aguidFileTypes.GetSize());
405 iBMP =
FindGUID(Gdiplus::ImageFormatBMP, aguidFileTypes);
406 iJPEG =
FindGUID(Gdiplus::ImageFormatJPEG, aguidFileTypes);
407 iGIF =
FindGUID(Gdiplus::ImageFormatGIF, aguidFileTypes);
408 iPNG =
FindGUID(Gdiplus::ImageFormatPNG, aguidFileTypes);
409 iTIFF =
FindGUID(Gdiplus::ImageFormatTIFF, aguidFileTypes);
410 iEMF =
FindGUID(Gdiplus::ImageFormatEMF, aguidFileTypes);
411 iWMF =
FindGUID(Gdiplus::ImageFormatWMF, aguidFileTypes);
415 ok(iJPEG > 0,
"iJPEG was %d\n", iJPEG);
416 ok(iGIF > 0,
"iGIF was %d\n", iGIF);
417 ok(iPNG > 0,
"iPNG was %d\n", iPNG);
418 ok(iTIFF > 0,
"iTIFF was %d\n", iTIFF);
419 ok(iEMF > 0,
"iEMF was %d\n", iEMF);
420 ok(iWMF > 0,
"iWMF was %d\n", iWMF);
434 INT iNULL, iBMP, iJPEG, iGIF, iPNG, iTIFF;
438 aguidFileTypes.RemoveAll();
440 ok(
hr ==
S_OK,
"Expected hr to be S_OK, was: %ld\n",
hr);
441 ok(aguidFileTypes.GetSize() >= 6,
442 "Expected aguidFileTypes.GetSize() to be >= 6, was %d.", aguidFileTypes.GetSize());
445 iBMP =
FindGUID(Gdiplus::ImageFormatBMP, aguidFileTypes);
446 iJPEG =
FindGUID(Gdiplus::ImageFormatJPEG, aguidFileTypes);
447 iGIF =
FindGUID(Gdiplus::ImageFormatGIF, aguidFileTypes);
448 iPNG =
FindGUID(Gdiplus::ImageFormatPNG, aguidFileTypes);
449 iTIFF =
FindGUID(Gdiplus::ImageFormatTIFF, aguidFileTypes);
452 ok(iBMP > 0,
"iBMP was %d\n", iBMP);
453 ok(iJPEG > 0,
"iJPEG was %d\n", iJPEG);
454 ok(iGIF > 0,
"iGIF was %d\n", iGIF);
455 ok(iPNG > 0,
"iPNG was %d\n", iPNG);
456 ok(iTIFF > 0,
"iTIFF was %d\n", iTIFF);
465 strExporters.
Empty();
466 aguidFileTypes.RemoveAll();
468 ok(
hr ==
S_OK,
"Expected hr to be S_OK, was: %ld\n",
hr);
469 ok(aguidFileTypes.GetSize() >= 5,
470 "Expected aguidFileTypes.GetSize() to be >= 5, was %d.", aguidFileTypes.GetSize());
473 iBMP =
FindGUID(Gdiplus::ImageFormatBMP, aguidFileTypes);
474 iJPEG =
FindGUID(Gdiplus::ImageFormatJPEG, aguidFileTypes);
475 iGIF =
FindGUID(Gdiplus::ImageFormatGIF, aguidFileTypes);
476 iPNG =
FindGUID(Gdiplus::ImageFormatPNG, aguidFileTypes);
477 iTIFF =
FindGUID(Gdiplus::ImageFormatTIFF, aguidFileTypes);
481 ok(iJPEG > 0,
"iJPEG was %d\n", iJPEG);
482 ok(iGIF > 0,
"iGIF was %d\n", iGIF);
483 ok(iPNG > 0,
"iPNG was %d\n", iPNG);
484 ok(iTIFF > 0,
"iTIFF was %d\n", iTIFF);
static void Test_CompatBitmapEntry(INT iLine, HDC hdc, INT width, INT height)
static void Test_Exporter(void)
static void Test_Bitmap(void)
static void Test_DIBSection(void)
static INT FindFilterItem(const TCHAR *filter, const TCHAR *item)
static void Test_ResBitmap(void)
static void Test_BitmapEntry(INT iLine, INT bpp, INT width, INT height, BOOL bTopDown)
static void Test_PixelAddress(INT iLine, const CImage &image1, const BITMAP &bm, INT x, INT y, BOOL bTopDown)
static void Test_DIBSectionEntry(INT iLine, HDC hdc, INT bpp, INT width, INT height, BOOL bTopDown)
static INT FindGUID(REFGUID rguid, const CSimpleArray< GUID > &guids)
static void Test_Importer(void)
static void Test_CompatBitmap(void)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ok_int(expression, result)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
static IAtlStringMgr * GetInstance(void)
HDC GetDC() const noexcept
bool IsDIBSection() const noexcept
COLORREF GetPixel(int x, int y) const noexcept
COLORREF GetTransparentColor() const noexcept
void SetPixel(int x, int y, COLORREF color) noexcept
HRESULT Save(IStream *pStream, GUID *guidFileType) const noexcept
static HRESULT GetImporterFilterString(CSimpleString &strImporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultLoad, TCHAR chSeparator=TEXT('|'))
void * GetBits() noexcept
void ReleaseDC() const noexcept
int GetHeight() const noexcept
void LoadFromResource(HINSTANCE hInstance, LPCTSTR pszResourceName) noexcept
int GetWidth() const noexcept
int GetMaxColorTableEntries() const noexcept
void GetColorTable(UINT iFirstColor, UINT nColors, RGBQUAD *prgbColors) const noexcept
int GetBPP() const noexcept
static HRESULT GetExporterFilterString(CSimpleString &strExporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultSave, TCHAR chSeparator=TEXT('|'))
void Attach(HBITMAP hBitmap, DIBOrientation eOrientation=DIBOR_DEFAULT) noexcept
bool IsNull() const noexcept
void * GetPixelAddress(int x, int y) noexcept
int GetPitch() const noexcept
HRESULT Load(LPCTSTR pszFileName) noexcept
#define FillMemory(BUF, SIZ, MASK)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLenum const GLvoid * addr
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
RGBQUAD bmiColorsExtra[256 - 1]
BITMAPINFOHEADER bmiHeader
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
#define ExpandEnvironmentStrings
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)