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
61'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x21,0x02,0x00,
620x21,0xf9,0x04,0x01,0x05,0x00,0x01,0x00,
630x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
640x02,0x02,0x44,0x01,0x00,0x3b
73 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x02, 0x00,
74 0x02, 0x00, 0xf1, 0x00, 0x00, 0xff, 0x00, 0x00,
75 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00,
76 0x00, 0x21, 0xf9, 0x04, 0x00, 0x64, 0x00, 0x00,
77 0x00, 0x21, 0xff, 0x0b, 0x4e, 0x45, 0x54, 0x53,
78 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e, 0x30, 0x03,
79 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
80 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x02, 0x03,
81 0x44, 0x34, 0x05, 0x00, 0x21, 0xf9, 0x04, 0x04,
82 0x64, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
83 0x00, 0x02, 0x00, 0x01, 0x00, 0x80, 0xff, 0xff,
84 0xff, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x0a,
103 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#lx\n",
hr);
120 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#lx\n",
hr);
123 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
127 refcount = IStream_Release(
stream);
128 ok(refcount > 0,
"expected stream refcount > 0\n");
144 ok(
decoder != 0,
"Failed to load GIF image data\n");
147 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
151 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
154 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
160 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
161 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
162 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
163 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
166 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
169 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
170 ok(
hr ==
S_OK,
"GetPixelFormat error %#lx\n",
hr);
174 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
175 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
178 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
184 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
185 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
186 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
187 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
190 IWICBitmapFrameDecode_Release(frame);
191 IWICBitmapDecoder_Release(
decoder);
205 ok(
decoder != 0,
"Failed to load GIF image data\n");
208 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
212 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
216 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
219 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
225 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
226 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
227 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
228 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
231 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
232 ok(
hr ==
S_OK,
"GetPixelFormat error %#lx\n",
hr);
236 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
237 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
240 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
246 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
247 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
248 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
249 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
251 IWICBitmapFrameDecode_Release(frame);
254 hr = IWICBitmapDecoder_GetFrame(
decoder, 1, &frame);
259 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
262 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
268 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
271 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
274 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
275 ok(
hr ==
S_OK,
"GetPixelFormat error %#lx\n",
hr);
279 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
280 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
283 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
289 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
290 ok(
color[1] == 0xff040506,
"expected 0xff040506, got %#x\n",
color[1]);
291 ok(
color[2] == 0x00070809,
"expected 0x00070809, got %#x\n",
color[2]);
292 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
295 IWICBitmapFrameDecode_Release(frame);
296 IWICBitmapDecoder_Release(
decoder);
311 ok(
decoder != 0,
"Failed to load GIF image data\n");
314 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
327 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
333 ok(
color[0] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[0]);
334 ok(
color[1] == 0x00ffffff,
"expected 0x00ffffff, got %#x\n",
color[1]);
336 for (
i = 2;
i < 256;
i++)
337 ok(
color[
i] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[
i]);
341 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
344 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
345 ok(
hr ==
S_OK,
"GetPixelFormat error %#lx\n",
hr);
349 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
350 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
353 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
364 ok(
color[0] == 0xff010203,
"expected 0xff010203, got %#x\n",
color[0]);
365 ok(
color[1] == 0x00040506,
"expected 0x00040506, got %#x\n",
color[1]);
366 ok(
color[2] == 0xff070809,
"expected 0xff070809, got %#x\n",
color[2]);
367 ok(
color[3] == 0xff0a0b0c,
"expected 0xff0a0b0c, got %#x\n",
color[3]);
370 IWICBitmapFrameDecode_Release(frame);
371 IWICBitmapDecoder_Release(
decoder);
385 ok(
decoder != 0,
"Failed to load GIF image data\n");
388 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
392 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
395 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
401 ok(
color[0] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[0]);
402 ok(
color[1] == 0x00ffffff,
"expected 0x00ffffff, got %#x\n",
color[1]);
403 ok(
color[2] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[2]);
404 ok(
color[3] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[3]);
407 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
410 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
411 ok(
hr ==
S_OK,
"GetPixelFormat error %#lx\n",
hr);
415 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
416 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
419 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
425 ok(
color[0] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[0]);
426 ok(
color[1] == 0x00ffffff,
"expected 0x00ffffff, got %#x\n",
color[1]);
427 ok(
color[2] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[2]);
428 ok(
color[3] == 0xff000000,
"expected 0xff000000, got %#x\n",
color[3]);
431 IWICBitmapFrameDecode_Release(frame);
432 IWICBitmapDecoder_Release(
decoder);
437 static const BYTE frame0[] = {0, 1, 0xfe, 0xfe, 2, 3, 0xfe, 0xfe};
438 static const BYTE frame1[] = {0, 0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe};
447 ok(
decoder != 0,
"Failed to load GIF image data\n");
449 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
458 hr = IWICBitmapFrameDecode_CopyPixels(frame,
NULL, 4,
sizeof(
buf),
buf);
460 ok(!
memcmp(
buf, frame0,
sizeof(
buf)),
"buf = %x %x %x %x %x %x %x %x\n",
463 IWICBitmapFrameDecode_Release(frame);
465 hr = IWICBitmapDecoder_GetFrame(
decoder, 1, &frame);
474 hr = IWICBitmapFrameDecode_CopyPixels(frame,
NULL, 4,
sizeof(
buf),
buf);
476 ok(!
memcmp(
buf, frame1,
sizeof(
buf)),
"buf = %x %x %x %x %x %x %x %x\n",
479 IWICBitmapFrameDecode_Release(frame);
481 IWICBitmapDecoder_Release(
decoder);
485'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x80,0x00,0x00,
4860xff,0xff,0xff,0xff,0xff,0xff,
4870x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
4880x02,0x02,0x44,0x01,0x00,0x3b
491'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x00,0x00,0x00,
4920x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
496'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x80,0x00,0x00,
4970xff,0xff,0xff,0xff,0xff,0xff,
4980x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
4990x02,0x02,0x44,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef
503'G',
'I',
'F',
'8',
'7',
'a',0x01,0x00,0x01,0x00,0x00,0x00,0x00,
5040x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,
5050x02,0x02,0x44,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef
519 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#lx\n",
hr);
521 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
524 IWICBitmapDecoder_Release(
decoder);
530 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#lx\n",
hr);
532 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
535 IWICBitmapDecoder_Release(
decoder);
541 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#lx\n",
hr);
543 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
546 IWICBitmapDecoder_Release(
decoder);
552 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#lx\n",
hr);
554 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
557 IWICBitmapDecoder_Release(
decoder);
5630x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x71,0xff,0xff,0xff,
5640xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
575 double dpiX = 0.0, dpiY = 0.0;
579 &IID_IWICImagingFactory, (
void**)&
factory);
580 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
583 hr = IWICImagingFactory_CreateStream(
factory, &gifstream);
584 ok(
hr ==
S_OK,
"CreateStream failed, hr=%lx\n",
hr);
589 ok(
hr ==
S_OK,
"InitializeFromMemory failed, hr=%lx\n",
hr);
594 &IID_IWICBitmapDecoder, (
void**)&
decoder);
595 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
602 ok(
hr ==
S_OK,
"Initialize failed, hr=%lx\n",
hr);
606 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &framedecode);
607 ok(
hr ==
S_OK,
"GetFrame failed, hr=%lx\n",
hr);
610 hr = IWICBitmapFrameDecode_GetResolution(framedecode, &dpiX, &dpiY);
612 ok(dpiX == 48.0,
"expected dpiX=48.0, got %f\n", dpiX);
613 ok(dpiY == 96.0,
"expected dpiY=96.0, got %f\n", dpiY);
615 IWICBitmapFrameDecode_Release(framedecode);
621 hr = IWICBitmapDecoder_GetFrameCount(
decoder, &framecount);
622 ok(
hr ==
S_OK,
"GetFrameCount failed, hr=%lx\n",
hr);
623 ok(framecount == 1,
"framecount=%u\n", framecount);
626 IWICBitmapDecoder_Release(
decoder);
629 IWICStream_Release(gifstream);
632 IWICImagingFactory_Release(
factory);
641 &IID_IWICImagingFactory, (
void **)&
factory);
642 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
652 IWICImagingFactory_Release(
factory);
657 ok(
hr ==
S_OK,
"WICCreateImagingFactory_Proxy error %#lx\n",
hr);
666 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 count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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