31'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0xa1,0x02,0x00,
320x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,
330x21,0xf9,0x04,0x01,0x05,0x00,0x01,0x00,
340x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
350x02,0x02,0x44,0x01,0x00,0x3b
42'G',
'I',
'F',
'8',
'9',
'a',0x01,0x00,0x01,0x00,0xa1,0x02,0x00,
430x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,
440x21,0xf9,0x04,0x01,0x05,0x00,0x01,0x00,
450x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
460x02,0x02,0x44,0x01,0x00,
470x21,0xf9,0x04,0x01,0x05,0x00,0x02,0x00,
480x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
490x02,0x02,0x44,0x01,0x00,0x3b
53'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x27,0x02,0x00,
540x21,0xf9,0x04,0x01,0x05,0x00,0x01,0x00,
550x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
560x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,
570x02,0x02,0x44,0x01,0x00,0x3b
66 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x02, 0x00,
67 0x02, 0x00, 0xf1, 0x00, 0x00, 0xff, 0x00, 0x00,
68 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00,
69 0x00, 0x21, 0xf9, 0x04, 0x00, 0x64, 0x00, 0x00,
70 0x00, 0x21, 0xff, 0x0b, 0x4e, 0x45, 0x54, 0x53,
71 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e, 0x30, 0x03,
72 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
73 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x02, 0x03,
74 0x44, 0x34, 0x05, 0x00, 0x21, 0xf9, 0x04, 0x04,
75 0x64, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
76 0x00, 0x02, 0x00, 0x01, 0x00, 0x80, 0xff, 0xff,
77 0xff, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x0a,
96 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#x\n",
hr);
113 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
115 hr = IWICBitmapDecoder_GetContainerFormat(decoder, &
format);
116 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
120 refcount = IStream_Release(
stream);
121 ok(refcount > 0,
"expected stream refcount > 0\n");
137 ok(decoder != 0,
"Failed to load GIF image data\n");
140 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
143 hr = IWICBitmapDecoder_CopyPalette(decoder,
palette);
144 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
147 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
153 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
154 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
155 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
156 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
159 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
162 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
163 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
167 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
168 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
171 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
177 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
178 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
179 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
180 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
183 IWICBitmapFrameDecode_Release(frame);
184 IWICBitmapDecoder_Release(decoder);
198 ok(decoder != 0,
"Failed to load GIF image data\n");
201 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
205 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
208 hr = IWICBitmapDecoder_CopyPalette(decoder,
palette);
209 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
212 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
218 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
219 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
220 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
221 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
224 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
225 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
229 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
230 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
233 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
239 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
240 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
241 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
242 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
244 IWICBitmapFrameDecode_Release(frame);
247 hr = IWICBitmapDecoder_GetFrame(decoder, 1, &frame);
251 hr = IWICBitmapDecoder_CopyPalette(decoder,
palette);
252 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
255 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
261 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
264 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
267 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
268 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
272 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
273 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
276 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
282 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
283 ok(
color[1] == 0xff040506,
"expected 0xff040506, got %#x\n",
color[1]);
284 ok(
color[2] == 0x00070809,
"expected 0x00070809, got %#x\n",
color[2]);
285 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
288 IWICBitmapFrameDecode_Release(frame);
289 IWICBitmapDecoder_Release(decoder);
304 ok(decoder != 0,
"Failed to load GIF image data\n");
307 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
310 hr = IWICBitmapDecoder_CopyPalette(decoder,
palette);
320 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
326 ok(
color[0] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[0]);
327 ok(
color[1] == 0x00ffffff,
"expected 0x00ffffff, got %#x\n",
color[1]);
329 for (
i = 2;
i < 256;
i++)
330 ok(
color[
i] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[
i]);
334 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
337 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
338 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
342 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
343 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
346 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
357 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
358 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
359 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
360 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
363 IWICBitmapFrameDecode_Release(frame);
364 IWICBitmapDecoder_Release(decoder);
369 static const BYTE frame0[] = {0, 1, 0xfe, 0xfe, 2, 3, 0xfe, 0xfe};
370 static const BYTE frame1[] = {0, 0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe};
379 ok(decoder != 0,
"Failed to load GIF image data\n");
381 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
390 hr = IWICBitmapFrameDecode_CopyPixels(frame,
NULL, 4,
sizeof(
buf),
buf);
392 ok(!
memcmp(
buf, frame0,
sizeof(
buf)),
"buf = %x %x %x %x %x %x %x %x\n",
395 IWICBitmapFrameDecode_Release(frame);
397 hr = IWICBitmapDecoder_GetFrame(decoder, 1, &frame);
406 hr = IWICBitmapFrameDecode_CopyPixels(frame,
NULL, 4,
sizeof(
buf),
buf);
408 ok(!
memcmp(
buf, frame1,
sizeof(
buf)),
"buf = %x %x %x %x %x %x %x %x\n",
411 IWICBitmapFrameDecode_Release(frame);
413 IWICBitmapDecoder_Release(decoder);
417'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x80,0x00,0x00,
4180xff,0xff,0xff,0xff,0xff,0xff,
4190x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
4200x02,0x02,0x44,0x01,0x00,0x3b
423'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x00,0x00,0x00,
4240x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
428'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x80,0x00,0x00,
4290xff,0xff,0xff,0xff,0xff,0xff,
4300x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
4310x02,0x02,0x44,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef
435'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x00,0x00,0x00,
4360x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
4370x02,0x02,0x44,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef
451 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
452 hr = IWICBitmapDecoder_GetContainerFormat(decoder, &
format);
453 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
456 IWICBitmapDecoder_Release(decoder);
462 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
463 hr = IWICBitmapDecoder_GetContainerFormat(decoder, &
format);
464 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
467 IWICBitmapDecoder_Release(decoder);
473 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
474 hr = IWICBitmapDecoder_GetContainerFormat(decoder, &
format);
475 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
478 IWICBitmapDecoder_Release(decoder);
484 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
485 hr = IWICBitmapDecoder_GetContainerFormat(decoder, &
format);
486 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
489 IWICBitmapDecoder_Release(decoder);
4950x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x71,0xff,0xff,0xff,
4960xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
507 double dpiX = 0.0, dpiY = 0.0;
511 &IID_IWICImagingFactory, (
void**)&
factory);
512 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
515 hr = IWICImagingFactory_CreateStream(
factory, &gifstream);
516 ok(
hr ==
S_OK,
"CreateStream failed, hr=%x\n",
hr);
521 ok(
hr ==
S_OK,
"InitializeFromMemory failed, hr=%x\n",
hr);
526 &IID_IWICBitmapDecoder, (
void**)&decoder);
527 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
532 hr = IWICBitmapDecoder_Initialize(decoder, (
IStream*)gifstream,
534 ok(
hr ==
S_OK,
"Initialize failed, hr=%x\n",
hr);
538 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
539 ok(
hr ==
S_OK,
"GetFrame failed, hr=%x\n",
hr);
542 hr = IWICBitmapFrameDecode_GetResolution(framedecode, &dpiX, &dpiY);
544 ok(dpiX == 48.0,
"expected dpiX=48.0, got %f\n", dpiX);
545 ok(dpiY == 96.0,
"expected dpiY=96.0, got %f\n", dpiY);
547 IWICBitmapFrameDecode_Release(framedecode);
553 hr = IWICBitmapDecoder_GetFrameCount(decoder, &framecount);
554 ok(
hr ==
S_OK,
"GetFrameCount failed, hr=%x\n",
hr);
555 ok(framecount == 1,
"framecount=%u\n", framecount);
558 IWICBitmapDecoder_Release(decoder);
561 IWICStream_Release(gifstream);
564 IWICImagingFactory_Release(
factory);
573 &IID_IWICImagingFactory, (
void **)&
factory);
574 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
583 IWICImagingFactory_Release(
factory);
588 ok(
hr ==
S_OK,
"WICCreateImagingFactory_Proxy error %#x\n",
hr);
596 IWICImagingFactory_Release(
factory);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
#define memcpy(s1, s2, n)
@ COINIT_APARTMENTTHREADED
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
@ WICDecodeMetadataCacheOnDemand
@ WICBitmapPaletteTypeCustom
#define WINCODEC_ERR_FRAMEMISSING