66{
67 struct decoder_info_test
68 {
70 const char *mimetype;
71 const char *extensions;
73 } decoder_info_tests[] =
74 {
75 {
76 &CLSID_WICBmpDecoder,
77 "image/bmp",
78 ".bmp,.dib,.rle"
79 },
80 {
81 &CLSID_WICGifDecoder,
82 "image/gif",
83 ".gif"
84 },
85 {
86 &CLSID_WICIcoDecoder,
87 "image/ico,image/x-icon",
88 ".ico,.icon",
89 1
90 },
91 {
92 &CLSID_WICJpegDecoder,
93 "image/jpeg,image/jpe,image/jpg",
94 ".jpeg,.jpe,.jpg,.jfif,.exif",
95 1
96 },
97 {
98 &CLSID_WICPngDecoder,
99 "image/png",
100 ".png"
101 },
102 {
103 &CLSID_WICTiffDecoder,
104 "image/tiff,image/tif",
105 ".tiff,.tif",
106 1
107 },
108 {
109 &CLSID_WICDdsDecoder,
110 "image/vnd.ms-dds",
111 ".dds",
112 }
113 };
123
125 {
126 struct decoder_info_test *
test = &decoder_info_tests[
i];
128 WCHAR extensionsW[64];
130
132 if (
test->clsid == &CLSID_WICDdsDecoder &&
hr !=
S_OK) {
133 win_skip(
"DDS decoder is not supported\n");
134 continue;
135 }
137
141 "%u: failed to get decoder info, hr %#lx.\n",
i,
hr);
142
144 {
145 decoder_info2 =
NULL;
146 hr = IWICBitmapDecoder_GetDecoderInfo(
decoder, &decoder_info2);
147 ok(
hr ==
S_OK,
"Failed to get decoder info, hr %#lx.\n",
hr);
148 ok(
decoder_info == decoder_info2,
"Unexpected decoder info instance.\n");
149
150 hr = IWICBitmapDecoderInfo_QueryInterface(
decoder_info, &IID_IWICBitmapDecoder, (
void **)&decoder2);
152
154 IWICBitmapDecoderInfo_Release(decoder_info2);
155 }
156 IWICBitmapDecoder_Release(
decoder);
157
160
162 ok(
hr ==
S_OK,
"CreateComponentInfo failed, hr=%lx\n",
hr);
163
164 hr = IWICComponentInfo_QueryInterface(
info, &IID_IWICBitmapDecoderInfo, (
void **)&
decoder_info);
165 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%lx\n",
hr);
166
169
171 ok(
hr ==
S_OK,
"GetCLSID failed, hr=%lx\n",
hr);
173
176
182
185
191
197 ok(
len ==
lstrlenW(mimetypeW) + 1,
"GetMimeType returned wrong len %i\n",
len);
198 }
203
208 ok(
len ==
lstrlenW(mimetypeW) + 1,
"GetMimeType returned wrong len %i\n",
len);
209 }
210 num_formats = 0xdeadbeef;
212 ok(
hr ==
S_OK,
"GetPixelFormats failed, hr=%lx\n",
hr);
213 ok((num_formats <= 21 && num_formats >= 1) ||
215 "%u: got %d formats\n",
i, num_formats);
216
219
222 ok(
hr ==
S_OK,
"GetPixelFormats failed, hr=%lx\n",
hr);
224
227 ok(
hr ==
S_OK,
"GetPixelFormats failed, hr=%lx\n",
hr);
229 "%u: got %d formats\n",
i, num_formats);
231
234 ok(
hr ==
S_OK,
"GetPixelFormats failed, hr=%lx\n",
hr);
235 ok(
count == num_formats,
"got %d formats, expected %d\n",
count, num_formats);
236 for (
j = 0;
j < num_formats;
j++)
238
241
245 ok(
hr ==
S_OK,
"GetPixelFormats failed, hr=%lx\n",
hr);
246 ok(
count == num_formats,
"got %d formats, expected %d\n",
count, num_formats);
247
250
254 ok(
len ==
lstrlenW(extensionsW) + 1,
"%u: GetFileExtensions returned wrong len %i\n",
i,
len);
255
258
260 ok(
hr ==
S_OK,
"GetFileExtensions failed, hr=%lx\n",
hr);
262 ok(
len ==
lstrlenW(extensionsW) + 1,
"GetFileExtensions returned wrong len %i\n",
len);
263
266 ok(
hr ==
S_OK,
"GetFileExtensions failed, hr=%lx\n",
hr);
271
276
283
285 IWICComponentInfo_Release(
info);
286 }
287}
DDPIXELFORMAT pixelformats[]
#define MultiByteToWideChar
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLuint GLuint GLsizei count
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 GLint GLint j
#define todo_wine_if(is_todo)
static BOOL is_pixelformat(GUID *format)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualCLSID(rclsid1, rclsid2)
#define WINCODEC_ERR_INSUFFICIENTBUFFER