ReactOS 0.4.16-dev-1056-gbe87e00
regsvr.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 Vincent Povirk for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#define COBJMACROS
20#include <stdarg.h>
21#include <string.h>
22
23#include "windef.h"
24#include "winbase.h"
25#include "wingdi.h"
26#include "winuser.h"
27#include "winreg.h"
28#include "winerror.h"
29
30#include "objbase.h"
31#include "ocidl.h"
32
33#include "wine/debug.h"
34
35#include "wincodecs_private.h"
36
38
39/***********************************************************************
40 * interface for self-registering
41 */
43{
44 DWORD length; /* 0 for end of list */
46 const BYTE *pattern;
47 const BYTE *mask;
49};
50
52{
53 CLSID const *clsid; /* NULL for end of list */
57 GUID const *vendor;
61 GUID const * const *formats;
63};
64
65static HRESULT register_decoders(struct regsvr_decoder const *list);
67
69{
70 CLSID const *clsid; /* NULL for end of list */
74 GUID const *vendor;
78 GUID const * const *formats;
79};
80
81static HRESULT register_encoders(struct regsvr_encoder const *list);
83
85{
86 CLSID const *clsid; /* NULL for end of list */
90 GUID const *vendor;
91 GUID const * const *formats;
92};
93
96
98{
101 const BYTE *pattern;
102 const BYTE *mask;
104};
105
107{
108 GUID const *format;
110};
111
113{
114 CLSID const *clsid; /* NULL for end of list */
119 GUID const *vendor;
125};
126
129
131{
132 CLSID const *clsid; /* NULL for end of list */
136 GUID const *vendor;
139 BYTE const * const *channelmasks;
142};
143
146
147/***********************************************************************
148 * static string constants
149 */
150static const WCHAR clsid_keyname[] = L"CLSID";
151static const char author_valuename[] = "Author";
152static const char friendlyname_valuename[] = "FriendlyName";
153static const WCHAR vendor_valuename[] = L"Vendor";
154static const WCHAR containerformat_valuename[] = L"ContainerFormat";
155static const char version_valuename[] = "Version";
156static const char mimetypes_valuename[] = "MimeTypes";
157static const char extensions_valuename[] = "FileExtensions";
158static const WCHAR formats_keyname[] = L"Formats";
159static const WCHAR patterns_keyname[] = L"Patterns";
160static const WCHAR instance_keyname[] = L"Instance";
161static const WCHAR clsid_valuename[] = L"CLSID";
162static const char length_valuename[] = "Length";
163static const char position_valuename[] = "Position";
164static const char pattern_valuename[] = "Pattern";
165static const char mask_valuename[] = "Mask";
166static const char endofstream_valuename[] = "EndOfStream";
167static const WCHAR pixelformats_keyname[] = L"PixelFormats";
168static const WCHAR metadataformat_valuename[] = L"MetadataFormat";
169static const char specversion_valuename[] = "SpecVersion";
170static const char requiresfullstream_valuename[] = "RequiresFullStream";
171static const char supportspadding_valuename[] = "SupportsPadding";
172static const char requiresfixedsize_valuename[] = "FixedSize";
173static const WCHAR containers_keyname[] = L"Containers";
174static const char dataoffset_valuename[] = "DataOffset";
175static const char bitsperpixel_valuename[] = "BitLength";
176static const char channelcount_valuename[] = "ChannelCount";
177static const char numericrepresentation_valuename[] = "NumericRepresentation";
178static const char supportstransparency_valuename[] = "SupportsTransparency";
179static const WCHAR channelmasks_keyname[] = L"ChannelMasks";
180
181/***********************************************************************
182 * register_decoders
183 */
185{
187 HKEY coclass_key;
188 WCHAR buf[39];
189 HKEY decoders_key;
190 HKEY instance_key;
191
193 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
194 if (res == ERROR_SUCCESS) {
195 StringFromGUID2(&CATID_WICBitmapDecoders, buf, 39);
196 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
197 KEY_READ | KEY_WRITE, NULL, &decoders_key, NULL);
198 if (res == ERROR_SUCCESS)
199 {
200 res = RegCreateKeyExW(decoders_key, instance_keyname, 0, NULL, 0,
201 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
202 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
203 }
204 if (res != ERROR_SUCCESS)
205 RegCloseKey(coclass_key);
206 }
207 if (res != ERROR_SUCCESS) goto error_return;
208
209 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
210 HKEY clsid_key;
211 HKEY instance_clsid_key;
212
213 StringFromGUID2(list->clsid, buf, 39);
214 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
215 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
216 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
217
218 StringFromGUID2(list->clsid, buf, 39);
219 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
220 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
221 if (res == ERROR_SUCCESS) {
222 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
223 (const BYTE*)buf, 78);
224 RegCloseKey(instance_clsid_key);
225 }
226 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
227
228 if (list->author) {
229 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
230 (const BYTE*)list->author,
231 strlen(list->author) + 1);
232 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
233 }
234
235 if (list->friendlyname) {
237 (const BYTE*)list->friendlyname,
238 strlen(list->friendlyname) + 1);
239 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
240 }
241
242 if (list->vendor) {
243 StringFromGUID2(list->vendor, buf, 39);
244 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
245 (const BYTE*)buf, 78);
246 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
247 }
248
249 if (list->container_format) {
250 StringFromGUID2(list->container_format, buf, 39);
252 (const BYTE*)buf, 78);
253 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
254 }
255
256 if (list->version) {
258 (const BYTE*)list->version,
259 strlen(list->version) + 1);
260 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
261 }
262
263 if (list->mimetypes) {
265 (const BYTE*)list->mimetypes,
266 strlen(list->mimetypes) + 1);
267 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
268 }
269
270 if (list->extensions) {
272 (const BYTE*)list->extensions,
273 strlen(list->extensions) + 1);
274 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
275 }
276
277 if (list->formats) {
278 HKEY formats_key;
279 GUID const * const *format;
280
281 res = RegCreateKeyExW(clsid_key, formats_keyname, 0, NULL, 0,
282 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
283 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
284 for (format=list->formats; *format; ++format)
285 {
286 HKEY format_key;
288 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
289 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
290 if (res != ERROR_SUCCESS) break;
291 RegCloseKey(format_key);
292 }
293 RegCloseKey(formats_key);
294 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
295 }
296
297 if (list->patterns) {
298 HKEY patterns_key;
299 int i;
300
301 res = RegCreateKeyExW(clsid_key, patterns_keyname, 0, NULL, 0,
302 KEY_READ | KEY_WRITE, NULL, &patterns_key, NULL);
303 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
304 for (i=0; list->patterns[i].length; i++)
305 {
306 HKEY pattern_key;
307 swprintf(buf, 39, L"%i", i);
308 res = RegCreateKeyExW(patterns_key, buf, 0, NULL, 0,
309 KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
310 if (res != ERROR_SUCCESS) break;
311 res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
312 (const BYTE*)&list->patterns[i].length, 4);
313 if (res == ERROR_SUCCESS)
315 (const BYTE*)&list->patterns[i].position, 4);
316 if (res == ERROR_SUCCESS)
318 list->patterns[i].pattern,
319 list->patterns[i].length);
320 if (res == ERROR_SUCCESS)
321 res = RegSetValueExA(pattern_key, mask_valuename, 0, REG_BINARY,
322 list->patterns[i].mask,
323 list->patterns[i].length);
324 if (res == ERROR_SUCCESS)
326 (const BYTE*)&list->patterns[i].endofstream, 4);
327 RegCloseKey(pattern_key);
328 }
329 RegCloseKey(patterns_key);
330 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
331 }
332
333 error_close_clsid_key:
334 RegCloseKey(clsid_key);
335 }
336
337error_close_coclass_key:
338 RegCloseKey(instance_key);
339 RegCloseKey(decoders_key);
340 RegCloseKey(coclass_key);
341error_return:
343}
344
345/***********************************************************************
346 * unregister_decoders
347 */
349{
351 HKEY coclass_key;
352 WCHAR buf[39];
353 HKEY decoders_key;
354 HKEY instance_key;
355
357 KEY_READ | KEY_WRITE, &coclass_key);
358 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
359
360 if (res == ERROR_SUCCESS) {
361 StringFromGUID2(&CATID_WICBitmapDecoders, buf, 39);
362 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
363 KEY_READ | KEY_WRITE, NULL, &decoders_key, NULL);
364 if (res == ERROR_SUCCESS)
365 {
366 res = RegCreateKeyExW(decoders_key, instance_keyname, 0, NULL, 0,
367 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
368 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
369 }
370 if (res != ERROR_SUCCESS)
371 RegCloseKey(coclass_key);
372 }
373 if (res != ERROR_SUCCESS) goto error_return;
374
375 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
376 StringFromGUID2(list->clsid, buf, 39);
377
378 res = RegDeleteTreeW(coclass_key, buf);
380 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
381
382 res = RegDeleteTreeW(instance_key, buf);
384 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
385 }
386
387error_close_coclass_key:
388 RegCloseKey(instance_key);
389 RegCloseKey(decoders_key);
390 RegCloseKey(coclass_key);
391error_return:
393}
394
395/***********************************************************************
396 * register_encoders
397 */
399{
401 HKEY coclass_key;
402 WCHAR buf[39];
403 HKEY encoders_key;
404 HKEY instance_key;
405
407 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
408 if (res == ERROR_SUCCESS) {
409 StringFromGUID2(&CATID_WICBitmapEncoders, buf, 39);
410 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
411 KEY_READ | KEY_WRITE, NULL, &encoders_key, NULL);
412 if (res == ERROR_SUCCESS)
413 {
414 res = RegCreateKeyExW(encoders_key, instance_keyname, 0, NULL, 0,
415 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
416 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
417 }
418 if (res != ERROR_SUCCESS)
419 RegCloseKey(coclass_key);
420 }
421 if (res != ERROR_SUCCESS) goto error_return;
422
423 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
424 HKEY clsid_key;
425 HKEY instance_clsid_key;
426
427 StringFromGUID2(list->clsid, buf, 39);
428 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
429 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
430 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
431
432 StringFromGUID2(list->clsid, buf, 39);
433 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
434 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
435 if (res == ERROR_SUCCESS) {
436 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
437 (const BYTE*)buf, 78);
438 RegCloseKey(instance_clsid_key);
439 }
440 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
441
442 if (list->author) {
443 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
444 (const BYTE*)list->author,
445 strlen(list->author) + 1);
446 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
447 }
448
449 if (list->friendlyname) {
451 (const BYTE*)list->friendlyname,
452 strlen(list->friendlyname) + 1);
453 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
454 }
455
456 if (list->vendor) {
457 StringFromGUID2(list->vendor, buf, 39);
458 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
459 (const BYTE*)buf, 78);
460 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
461 }
462
463 if (list->container_format) {
464 StringFromGUID2(list->container_format, buf, 39);
466 (const BYTE*)buf, 78);
467 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
468 }
469
470 if (list->version) {
472 (const BYTE*)list->version,
473 strlen(list->version) + 1);
474 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
475 }
476
477 if (list->mimetypes) {
479 (const BYTE*)list->mimetypes,
480 strlen(list->mimetypes) + 1);
481 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
482 }
483
484 if (list->extensions) {
486 (const BYTE*)list->extensions,
487 strlen(list->extensions) + 1);
488 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
489 }
490
491 if (list->formats) {
492 HKEY formats_key;
493 GUID const * const *format;
494
495 res = RegCreateKeyExW(clsid_key, formats_keyname, 0, NULL, 0,
496 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
497 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
498 for (format=list->formats; *format; ++format)
499 {
500 HKEY format_key;
502 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
503 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
504 if (res != ERROR_SUCCESS) break;
505 RegCloseKey(format_key);
506 }
507 RegCloseKey(formats_key);
508 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
509 }
510
511 error_close_clsid_key:
512 RegCloseKey(clsid_key);
513 }
514
515error_close_coclass_key:
516 RegCloseKey(instance_key);
517 RegCloseKey(encoders_key);
518 RegCloseKey(coclass_key);
519error_return:
521}
522
523/***********************************************************************
524 * unregister_encoders
525 */
527{
529 HKEY coclass_key;
530 WCHAR buf[39];
531 HKEY encoders_key;
532 HKEY instance_key;
533
535 KEY_READ | KEY_WRITE, &coclass_key);
536 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
537
538 if (res == ERROR_SUCCESS) {
539 StringFromGUID2(&CATID_WICBitmapEncoders, buf, 39);
540 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
541 KEY_READ | KEY_WRITE, NULL, &encoders_key, NULL);
542 if (res == ERROR_SUCCESS)
543 {
544 res = RegCreateKeyExW(encoders_key, instance_keyname, 0, NULL, 0,
545 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
546 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
547 }
548 if (res != ERROR_SUCCESS)
549 RegCloseKey(coclass_key);
550 }
551 if (res != ERROR_SUCCESS) goto error_return;
552
553 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
554 StringFromGUID2(list->clsid, buf, 39);
555
556 res = RegDeleteTreeW(coclass_key, buf);
558 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
559
560 res = RegDeleteTreeW(instance_key, buf);
562 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
563 }
564
565error_close_coclass_key:
566 RegCloseKey(instance_key);
567 RegCloseKey(encoders_key);
568 RegCloseKey(coclass_key);
569error_return:
571}
572
573/***********************************************************************
574 * register_converters
575 */
577{
579 HKEY coclass_key;
580 WCHAR buf[39];
581 HKEY converters_key;
582 HKEY instance_key;
583
585 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
586 if (res == ERROR_SUCCESS) {
587 StringFromGUID2(&CATID_WICFormatConverters, buf, 39);
588 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
589 KEY_READ | KEY_WRITE, NULL, &converters_key, NULL);
590 if (res == ERROR_SUCCESS)
591 {
592 res = RegCreateKeyExW(converters_key, instance_keyname, 0, NULL, 0,
593 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
594 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
595 }
596 if (res != ERROR_SUCCESS)
597 RegCloseKey(coclass_key);
598 }
599 if (res != ERROR_SUCCESS) goto error_return;
600
601 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
602 HKEY clsid_key;
603 HKEY instance_clsid_key;
604
605 StringFromGUID2(list->clsid, buf, 39);
606 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
607 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
608 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
609
610 StringFromGUID2(list->clsid, buf, 39);
611 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
612 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
613 if (res == ERROR_SUCCESS) {
614 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
615 (const BYTE*)buf, 78);
616 RegCloseKey(instance_clsid_key);
617 }
618 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
619
620 if (list->author) {
621 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
622 (const BYTE*)list->author,
623 strlen(list->author) + 1);
624 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
625 }
626
627 if (list->friendlyname) {
629 (const BYTE*)list->friendlyname,
630 strlen(list->friendlyname) + 1);
631 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
632 }
633
634 if (list->vendor) {
635 StringFromGUID2(list->vendor, buf, 39);
636 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
637 (const BYTE*)buf, 78);
638 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
639 }
640
641 if (list->version) {
643 (const BYTE*)list->version,
644 strlen(list->version) + 1);
645 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
646 }
647
648 if (list->formats) {
649 HKEY formats_key;
650 GUID const * const *format;
651
652 res = RegCreateKeyExW(clsid_key, pixelformats_keyname, 0, NULL, 0,
653 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
654 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
655 for (format=list->formats; *format; ++format)
656 {
657 HKEY format_key;
659 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
660 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
661 if (res != ERROR_SUCCESS) break;
662 RegCloseKey(format_key);
663 }
664 RegCloseKey(formats_key);
665 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
666 }
667
668 error_close_clsid_key:
669 RegCloseKey(clsid_key);
670 }
671
672error_close_coclass_key:
673 RegCloseKey(instance_key);
674 RegCloseKey(converters_key);
675 RegCloseKey(coclass_key);
676error_return:
678}
679
680/***********************************************************************
681 * unregister_converters
682 */
684{
686 HKEY coclass_key;
687 WCHAR buf[39];
688 HKEY converters_key;
689 HKEY instance_key;
690
692 KEY_READ | KEY_WRITE, &coclass_key);
693 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
694
695 if (res == ERROR_SUCCESS) {
696 StringFromGUID2(&CATID_WICFormatConverters, buf, 39);
697 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
698 KEY_READ | KEY_WRITE, NULL, &converters_key, NULL);
699 if (res == ERROR_SUCCESS)
700 {
701 res = RegCreateKeyExW(converters_key, instance_keyname, 0, NULL, 0,
702 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
703 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
704 }
705 if (res != ERROR_SUCCESS)
706 RegCloseKey(coclass_key);
707 }
708 if (res != ERROR_SUCCESS) goto error_return;
709
710 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
711 StringFromGUID2(list->clsid, buf, 39);
712
713 res = RegDeleteTreeW(coclass_key, buf);
715 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
716
717 res = RegDeleteTreeW(instance_key, buf);
719 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
720 }
721
722error_close_coclass_key:
723 RegCloseKey(instance_key);
724 RegCloseKey(converters_key);
725 RegCloseKey(coclass_key);
726error_return:
728}
729
730/***********************************************************************
731 * register_metadatareaders
732 */
734{
736 HKEY coclass_key;
737 WCHAR buf[39];
738 HKEY readers_key;
739 HKEY instance_key;
740
742 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
743 if (res == ERROR_SUCCESS) {
744 StringFromGUID2(&CATID_WICMetadataReader, buf, 39);
745 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
746 KEY_READ | KEY_WRITE, NULL, &readers_key, NULL);
747 if (res == ERROR_SUCCESS)
748 {
749 res = RegCreateKeyExW(readers_key, instance_keyname, 0, NULL, 0,
750 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
751 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
752 }
753 if (res != ERROR_SUCCESS)
754 RegCloseKey(coclass_key);
755 }
756 if (res != ERROR_SUCCESS) goto error_return;
757
758 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
759 HKEY clsid_key;
760 HKEY instance_clsid_key;
761
762 StringFromGUID2(list->clsid, buf, 39);
763 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
764 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
765 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
766
767 StringFromGUID2(list->clsid, buf, 39);
768 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
769 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
770 if (res == ERROR_SUCCESS) {
771 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
772 (const BYTE*)buf, 78);
773 RegCloseKey(instance_clsid_key);
774 }
775 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
776
777 if (list->author) {
778 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
779 (const BYTE*)list->author,
780 strlen(list->author) + 1);
781 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
782 }
783
784 if (list->friendlyname) {
786 (const BYTE*)list->friendlyname,
787 strlen(list->friendlyname) + 1);
788 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
789 }
790
791 if (list->vendor) {
792 StringFromGUID2(list->vendor, buf, 39);
793 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
794 (const BYTE*)buf, 78);
795 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
796 }
797
798 if (list->metadata_format) {
799 StringFromGUID2(list->metadata_format, buf, 39);
801 (const BYTE*)buf, 78);
802 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
803 }
804
805 if (list->version) {
807 (const BYTE*)list->version,
808 strlen(list->version) + 1);
809 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
810 }
811
812 if (list->specversion) {
814 (const BYTE*)list->version,
815 strlen(list->version) + 1);
816 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
817 }
818
820 (const BYTE*)&list->requires_fullstream, 4);
821 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
822
824 (const BYTE*)&list->supports_padding, 4);
825 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
826
827 if (list->requires_fixedsize) {
829 (const BYTE*)&list->requires_fixedsize, 4);
830 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
831 }
832
833 if (list->containers) {
834 HKEY containers_key;
835 const struct reader_containers *container;
836
837 res = RegCreateKeyExW(clsid_key, containers_keyname, 0, NULL, 0,
838 KEY_READ | KEY_WRITE, NULL, &containers_key, NULL);
839 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
840 for (container=list->containers; container->format; ++container)
841 {
842 HKEY format_key;
843 int i;
844 StringFromGUID2(container->format, buf, 39);
845 res = RegCreateKeyExW(containers_key, buf, 0, NULL, 0,
846 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
847 if (res != ERROR_SUCCESS) break;
848
849 for (i=0; container->patterns[i].length; i++)
850 {
851 HKEY pattern_key;
852 swprintf(buf, 39, L"%i", i);
853 res = RegCreateKeyExW(format_key, buf, 0, NULL, 0,
854 KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
855 if (res != ERROR_SUCCESS) break;
857 (const BYTE*)&container->patterns[i].position, 4);
858 if (res == ERROR_SUCCESS)
860 container->patterns[i].pattern,
861 container->patterns[i].length);
862 if (res == ERROR_SUCCESS)
863 res = RegSetValueExA(pattern_key, mask_valuename, 0, REG_BINARY,
864 container->patterns[i].mask,
865 container->patterns[i].length);
866 if (res == ERROR_SUCCESS && container->patterns[i].data_offset)
868 (const BYTE*)&container->patterns[i].data_offset, 4);
869 RegCloseKey(pattern_key);
870 }
871
872 RegCloseKey(format_key);
873 }
874 RegCloseKey(containers_key);
875 }
876
877 error_close_clsid_key:
878 RegCloseKey(clsid_key);
879 }
880
881error_close_coclass_key:
882 RegCloseKey(instance_key);
883 RegCloseKey(readers_key);
884 RegCloseKey(coclass_key);
885error_return:
887}
888
889/***********************************************************************
890 * unregister_metadatareaders
891 */
893{
895 HKEY coclass_key;
896 WCHAR buf[39];
897 HKEY readers_key;
898 HKEY instance_key;
899
901 KEY_READ | KEY_WRITE, &coclass_key);
902 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
903
904 if (res == ERROR_SUCCESS) {
905 StringFromGUID2(&CATID_WICMetadataReader, buf, 39);
906 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
907 KEY_READ | KEY_WRITE, NULL, &readers_key, NULL);
908 if (res == ERROR_SUCCESS)
909 {
910 res = RegCreateKeyExW(readers_key, instance_keyname, 0, NULL, 0,
911 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
912 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
913 }
914 if (res != ERROR_SUCCESS)
915 RegCloseKey(coclass_key);
916 }
917 if (res != ERROR_SUCCESS) goto error_return;
918
919 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
920 StringFromGUID2(list->clsid, buf, 39);
921
922 res = RegDeleteTreeW(coclass_key, buf);
924 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
925
926 res = RegDeleteTreeW(instance_key, buf);
928 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
929 }
930
931error_close_coclass_key:
932 RegCloseKey(instance_key);
933 RegCloseKey(readers_key);
934 RegCloseKey(coclass_key);
935error_return:
937}
938
939/***********************************************************************
940 * register_pixelformats
941 */
943{
945 HKEY coclass_key;
946 WCHAR buf[39];
947 HKEY formats_key;
948 HKEY instance_key;
949
951 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
952 if (res == ERROR_SUCCESS) {
953 StringFromGUID2(&CATID_WICPixelFormats, buf, 39);
954 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
955 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
956 if (res == ERROR_SUCCESS)
957 {
958 res = RegCreateKeyExW(formats_key, instance_keyname, 0, NULL, 0,
959 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
960 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
961 }
962 if (res != ERROR_SUCCESS)
963 RegCloseKey(coclass_key);
964 }
965 if (res != ERROR_SUCCESS) goto error_return;
966
967 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
968 HKEY clsid_key;
969 HKEY instance_clsid_key;
970
971 StringFromGUID2(list->clsid, buf, 39);
972 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
973 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
974 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
975
976 StringFromGUID2(list->clsid, buf, 39);
977 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
978 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
979 if (res == ERROR_SUCCESS) {
980 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
981 (const BYTE*)buf, 78);
982 RegCloseKey(instance_clsid_key);
983 }
984 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
985
986 if (list->author) {
987 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
988 (const BYTE*)list->author,
989 strlen(list->author) + 1);
990 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
991 }
992
993 if (list->friendlyname) {
995 (const BYTE*)list->friendlyname,
996 strlen(list->friendlyname) + 1);
997 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
998 }
999
1000 if (list->vendor) {
1001 StringFromGUID2(list->vendor, buf, 39);
1002 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
1003 (const BYTE*)buf, 78);
1004 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1005 }
1006
1007 if (list->version) {
1008 res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
1009 (const BYTE*)list->version,
1010 strlen(list->version) + 1);
1011 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1012 }
1013
1015 (const BYTE*)&list->bitsperpixel, 4);
1016 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1017
1019 (const BYTE*)&list->channelcount, 4);
1020 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1021
1023 (const BYTE*)&list->numericrepresentation, 4);
1024 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1025
1027 (const BYTE*)&list->supportsalpha, 4);
1028 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1029
1030 if (list->channelmasks) {
1031 HKEY masks_key;
1032 UINT i, mask_size;
1034
1035 mask_size = (list->bitsperpixel + 7)/8;
1036
1037 res = RegCreateKeyExW(clsid_key, channelmasks_keyname, 0, NULL, 0,
1038 KEY_READ | KEY_WRITE, NULL, &masks_key, NULL);
1039 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1040 for (i=0; i < list->channelcount; i++)
1041 {
1044 list->channelmasks[i], mask_size);
1045 if (res != ERROR_SUCCESS) break;
1046 }
1047 RegCloseKey(masks_key);
1048 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1049 }
1050
1051 error_close_clsid_key:
1052 RegCloseKey(clsid_key);
1053 }
1054
1055error_close_coclass_key:
1056 RegCloseKey(instance_key);
1057 RegCloseKey(formats_key);
1058 RegCloseKey(coclass_key);
1059error_return:
1061}
1062
1063/***********************************************************************
1064 * unregister_pixelformats
1065 */
1067{
1069 HKEY coclass_key;
1070 WCHAR buf[39];
1071 HKEY formats_key;
1072 HKEY instance_key;
1073
1075 KEY_READ | KEY_WRITE, &coclass_key);
1076 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
1077
1078 if (res == ERROR_SUCCESS) {
1079 StringFromGUID2(&CATID_WICPixelFormats, buf, 39);
1080 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
1081 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
1082 if (res == ERROR_SUCCESS)
1083 {
1084 res = RegCreateKeyExW(formats_key, instance_keyname, 0, NULL, 0,
1085 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
1086 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1087 }
1088 if (res != ERROR_SUCCESS)
1089 RegCloseKey(coclass_key);
1090 }
1091 if (res != ERROR_SUCCESS) goto error_return;
1092
1093 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
1094 StringFromGUID2(list->clsid, buf, 39);
1095
1096 res = RegDeleteTreeW(coclass_key, buf);
1098 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1099
1100 res = RegDeleteTreeW(instance_key, buf);
1102 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1103 }
1104
1105error_close_coclass_key:
1106 RegCloseKey(instance_key);
1107 RegCloseKey(formats_key);
1108 RegCloseKey(coclass_key);
1109error_return:
1111}
1112
1113/***********************************************************************
1114 * decoder list
1115 */
1116static const BYTE mask_all[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
1117
1118static const BYTE bmp_magic[] = {0x42,0x4d};
1119
1120static GUID const * const bmp_formats[] = {
1121 &GUID_WICPixelFormat1bppIndexed,
1122 &GUID_WICPixelFormat2bppIndexed,
1123 &GUID_WICPixelFormat4bppIndexed,
1124 &GUID_WICPixelFormat8bppIndexed,
1125 &GUID_WICPixelFormat16bppBGR555,
1126 &GUID_WICPixelFormat16bppBGR565,
1127 &GUID_WICPixelFormat24bppBGR,
1128 &GUID_WICPixelFormat32bppBGR,
1129 &GUID_WICPixelFormat32bppBGRA,
1130 NULL
1131};
1132
1134 {2,0,bmp_magic,mask_all,0},
1135 {0}
1136};
1137
1138static const BYTE dds_magic[] = "DDS ";
1139
1140static GUID const * const dds_formats[] = {
1141 &GUID_WICPixelFormat32bppBGRA,
1142 NULL
1143};
1144
1146 {4,0,dds_magic,mask_all,0},
1147 {0}
1148};
1149
1150static const BYTE gif87a_magic[6] = "GIF87a";
1151static const BYTE gif89a_magic[6] = "GIF89a";
1152
1153static GUID const * const gif_formats[] = {
1154 &GUID_WICPixelFormat8bppIndexed,
1155 NULL
1156};
1157
1159 {6,0,gif87a_magic,mask_all,0},
1160 {6,0,gif89a_magic,mask_all,0},
1161 {0}
1162};
1163
1164static const BYTE ico_magic[] = {00,00,01,00};
1165
1166static GUID const * const ico_formats[] = {
1167 &GUID_WICPixelFormat32bppBGRA,
1168 NULL
1169};
1170
1172 {4,0,ico_magic,mask_all,0},
1173 {0}
1174};
1175
1176static const BYTE jpeg_magic[] = {0xff, 0xd8};
1177
1178static GUID const * const jpeg_formats[] = {
1179 &GUID_WICPixelFormat24bppBGR,
1180 &GUID_WICPixelFormat32bppCMYK,
1181 &GUID_WICPixelFormat8bppGray,
1182 NULL
1183};
1184
1186 {2,0,jpeg_magic,mask_all,0},
1187 {0}
1188};
1189
1190static const BYTE wmp_magic_v0[] = {0x49, 0x49, 0xbc, 0x00};
1191static const BYTE wmp_magic_v1[] = {0x49, 0x49, 0xbc, 0x01};
1192
1193static GUID const * const wmp_formats[] = {
1194 &GUID_WICPixelFormat128bppRGBAFixedPoint,
1195 &GUID_WICPixelFormat128bppRGBAFloat,
1196 &GUID_WICPixelFormat128bppRGBFloat,
1197 &GUID_WICPixelFormat16bppBGR555,
1198 &GUID_WICPixelFormat16bppBGR565,
1199 &GUID_WICPixelFormat16bppGray,
1200 &GUID_WICPixelFormat16bppGrayFixedPoint,
1201 &GUID_WICPixelFormat16bppGrayHalf,
1202 &GUID_WICPixelFormat24bppBGR,
1203 &GUID_WICPixelFormat24bppRGB,
1204 &GUID_WICPixelFormat32bppBGR,
1205 &GUID_WICPixelFormat32bppBGR101010,
1206 &GUID_WICPixelFormat32bppBGRA,
1207 &GUID_WICPixelFormat32bppCMYK,
1208 &GUID_WICPixelFormat32bppGrayFixedPoint,
1209 &GUID_WICPixelFormat32bppGrayFloat,
1210 &GUID_WICPixelFormat32bppRGBE,
1211 &GUID_WICPixelFormat40bppCMYKAlpha,
1212 &GUID_WICPixelFormat48bppRGB,
1213 &GUID_WICPixelFormat48bppRGBFixedPoint,
1214 &GUID_WICPixelFormat48bppRGBHalf,
1215 &GUID_WICPixelFormat64bppCMYK,
1216 &GUID_WICPixelFormat64bppRGBA,
1217 &GUID_WICPixelFormat64bppRGBAFixedPoint,
1218 &GUID_WICPixelFormat64bppRGBAHalf,
1219 &GUID_WICPixelFormat80bppCMYKAlpha,
1220 &GUID_WICPixelFormat8bppGray,
1221 &GUID_WICPixelFormat96bppRGBFixedPoint,
1222 &GUID_WICPixelFormatBlackWhite,
1223 NULL
1224};
1225
1227 {4,0,wmp_magic_v0,mask_all,0},
1228 {4,0,wmp_magic_v1,mask_all,0},
1229 {0}
1230};
1231
1232static const BYTE png_magic[] = {137,80,78,71,13,10,26,10};
1233
1234static GUID const * const png_formats[] = {
1235 &GUID_WICPixelFormatBlackWhite,
1236 &GUID_WICPixelFormat2bppGray,
1237 &GUID_WICPixelFormat4bppGray,
1238 &GUID_WICPixelFormat8bppGray,
1239 &GUID_WICPixelFormat16bppGray,
1240 &GUID_WICPixelFormat32bppBGRA,
1241 &GUID_WICPixelFormat64bppRGBA,
1242 &GUID_WICPixelFormat1bppIndexed,
1243 &GUID_WICPixelFormat2bppIndexed,
1244 &GUID_WICPixelFormat4bppIndexed,
1245 &GUID_WICPixelFormat8bppIndexed,
1246 &GUID_WICPixelFormat24bppBGR,
1247 &GUID_WICPixelFormat48bppRGB,
1248 NULL
1249};
1250
1252 {8,0,png_magic,mask_all,0},
1253 {0}
1254};
1255
1256static const BYTE tiff_magic_le[] = {0x49,0x49,42,0};
1257static const BYTE tiff_magic_be[] = {0x4d,0x4d,0,42};
1258
1259static GUID const * const tiff_decode_formats[] = {
1260 &GUID_WICPixelFormatBlackWhite,
1261 &GUID_WICPixelFormat4bppGray,
1262 &GUID_WICPixelFormat8bppGray,
1263 &GUID_WICPixelFormat16bppGray,
1264 &GUID_WICPixelFormat32bppGrayFloat,
1265 &GUID_WICPixelFormat1bppIndexed,
1266 &GUID_WICPixelFormat2bppIndexed,
1267 &GUID_WICPixelFormat4bppIndexed,
1268 &GUID_WICPixelFormat8bppIndexed,
1269 &GUID_WICPixelFormat24bppBGR,
1270 &GUID_WICPixelFormat32bppBGR,
1271 &GUID_WICPixelFormat32bppBGRA,
1272 &GUID_WICPixelFormat32bppPBGRA,
1273 &GUID_WICPixelFormat48bppRGB,
1274 &GUID_WICPixelFormat64bppRGBA,
1275 &GUID_WICPixelFormat64bppPRGBA,
1276 &GUID_WICPixelFormat32bppCMYK,
1277 &GUID_WICPixelFormat64bppCMYK,
1278 &GUID_WICPixelFormat96bppRGBFloat,
1279 &GUID_WICPixelFormat128bppRGBAFloat,
1280 &GUID_WICPixelFormat128bppPRGBAFloat,
1281 NULL
1282};
1283
1285 {4,0,tiff_magic_le,mask_all,0},
1286 {4,0,tiff_magic_be,mask_all,0},
1287 {0}
1288};
1289
1290static const BYTE tga_footer_magic[18] = "TRUEVISION-XFILE.";
1291
1292static const BYTE tga_indexed_magic[18] = {0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0};
1293static const BYTE tga_indexed_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf};
1294
1295static const BYTE tga_truecolor_magic[18] = {0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
1296static const BYTE tga_truecolor_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0x87,0xc0};
1297
1298static const BYTE tga_grayscale_magic[18] = {0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0};
1299static const BYTE tga_grayscale_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf};
1300
1301static GUID const * const tga_formats[] = {
1302 &GUID_WICPixelFormat8bppGray,
1303 &GUID_WICPixelFormat8bppIndexed,
1304 &GUID_WICPixelFormat16bppGray,
1305 &GUID_WICPixelFormat16bppBGR555,
1306 &GUID_WICPixelFormat24bppBGR,
1307 &GUID_WICPixelFormat32bppBGRA,
1308 &GUID_WICPixelFormat32bppPBGRA,
1309 NULL
1310};
1311
1313 {18,18,tga_footer_magic,mask_all,1},
1317 {0}
1318};
1319
1321 { &CLSID_WICBmpDecoder,
1322 "The Wine Project",
1323 "BMP Decoder",
1324 "1.0.0.0",
1325 &GUID_VendorMicrosoft,
1326 &GUID_ContainerFormatBmp,
1327 "image/bmp",
1328 ".bmp,.dib,.rle",
1331 },
1332 { &CLSID_WICDdsDecoder,
1333 "The Wine Project",
1334 "DDS Decoder",
1335 "1.0.0.0",
1336 &GUID_VendorMicrosoft,
1337 &GUID_ContainerFormatDds,
1338 "image/vnd.ms-dds",
1339 ".dds",
1342 },
1343 { &CLSID_WICGifDecoder,
1344 "The Wine Project",
1345 "GIF Decoder",
1346 "1.0.0.0",
1347 &GUID_VendorMicrosoft,
1348 &GUID_ContainerFormatGif,
1349 "image/gif",
1350 ".gif",
1353 },
1354 { &CLSID_WICIcoDecoder,
1355 "The Wine Project",
1356 "ICO Decoder",
1357 "1.0.0.0",
1358 &GUID_VendorMicrosoft,
1359 &GUID_ContainerFormatIco,
1360 "image/vnd.microsoft.icon",
1361 ".ico",
1364 },
1365 { &CLSID_WICJpegDecoder,
1366 "The Wine Project",
1367 "JPEG Decoder",
1368 "1.0.0.0",
1369 &GUID_VendorMicrosoft,
1370 &GUID_ContainerFormatJpeg,
1371 "image/jpeg",
1372 ".jpg;.jpeg;.jfif",
1375 },
1376 { &CLSID_WICWmpDecoder,
1377 "The Wine Project",
1378 "JPEG-XR Decoder",
1379 "1.0.0.0",
1380 &GUID_VendorMicrosoft,
1381 &GUID_ContainerFormatWmp,
1382 "image/jxr",
1383 ".jxr;.hdp;.wdp",
1386 },
1387 { &CLSID_WICPngDecoder,
1388 "The Wine Project",
1389 "PNG Decoder",
1390 "1.0.0.0",
1391 &GUID_VendorMicrosoft,
1392 &GUID_ContainerFormatPng,
1393 "image/png",
1394 ".png",
1397 },
1398 { &CLSID_WICTiffDecoder,
1399 "The Wine Project",
1400 "TIFF Decoder",
1401 "1.0.0.0",
1402 &GUID_VendorMicrosoft,
1403 &GUID_ContainerFormatTiff,
1404 "image/tiff",
1405 ".tif;.tiff",
1408 },
1409 { &CLSID_WineTgaDecoder,
1410 "The Wine Project",
1411 "TGA Decoder",
1412 "1.0.0.0",
1413 &GUID_VendorWine,
1414 &GUID_WineContainerFormatTga,
1415 "image/x-targa",
1416 ".tga;.tpic",
1419 },
1420 { NULL } /* list terminator */
1421};
1422
1423static GUID const * const bmp_encode_formats[] = {
1424 &GUID_WICPixelFormat16bppBGR555,
1425 &GUID_WICPixelFormat16bppBGR565,
1426 &GUID_WICPixelFormat24bppBGR,
1427 &GUID_WICPixelFormat32bppBGR,
1428 &GUID_WICPixelFormatBlackWhite,
1429 &GUID_WICPixelFormat1bppIndexed,
1430 &GUID_WICPixelFormat4bppIndexed,
1431 &GUID_WICPixelFormat8bppIndexed,
1432 NULL
1433};
1434
1435static GUID const * const png_encode_formats[] = {
1436 &GUID_WICPixelFormat24bppBGR,
1437 &GUID_WICPixelFormatBlackWhite,
1438 &GUID_WICPixelFormat2bppGray,
1439 &GUID_WICPixelFormat4bppGray,
1440 &GUID_WICPixelFormat8bppGray,
1441 &GUID_WICPixelFormat16bppGray,
1442 &GUID_WICPixelFormat32bppBGR,
1443 &GUID_WICPixelFormat32bppBGRA,
1444 &GUID_WICPixelFormat48bppRGB,
1445 &GUID_WICPixelFormat64bppRGBA,
1446 &GUID_WICPixelFormat1bppIndexed,
1447 &GUID_WICPixelFormat2bppIndexed,
1448 &GUID_WICPixelFormat4bppIndexed,
1449 &GUID_WICPixelFormat8bppIndexed,
1450 NULL
1451};
1452
1453static GUID const * const tiff_encode_formats[] = {
1454 &GUID_WICPixelFormatBlackWhite,
1455 &GUID_WICPixelFormat4bppGray,
1456 &GUID_WICPixelFormat8bppGray,
1457 &GUID_WICPixelFormat1bppIndexed,
1458 &GUID_WICPixelFormat4bppIndexed,
1459 &GUID_WICPixelFormat8bppIndexed,
1460 &GUID_WICPixelFormat24bppBGR,
1461 &GUID_WICPixelFormat32bppBGRA,
1462 &GUID_WICPixelFormat32bppPBGRA,
1463 &GUID_WICPixelFormat48bppRGB,
1464 &GUID_WICPixelFormat64bppRGBA,
1465 &GUID_WICPixelFormat64bppPRGBA,
1466 NULL
1467};
1468
1470 { &CLSID_WICBmpEncoder,
1471 "The Wine Project",
1472 "BMP Encoder",
1473 "1.0.0.0",
1474 &GUID_VendorMicrosoft,
1475 &GUID_ContainerFormatBmp,
1476 "image/bmp",
1477 ".bmp,.dib,.rle",
1479 },
1480 { &CLSID_WICGifEncoder,
1481 "The Wine Project",
1482 "GIF Encoder",
1483 "1.0.0.0",
1484 &GUID_VendorMicrosoft,
1485 &GUID_ContainerFormatGif,
1486 "image/gif",
1487 ".gif",
1489 },
1490 { &CLSID_WICJpegEncoder,
1491 "The Wine Project",
1492 "JPEG Encoder",
1493 "1.0.0.0",
1494 &GUID_VendorMicrosoft,
1495 &GUID_ContainerFormatJpeg,
1496 "image/jpeg",
1497 ".jpg;.jpeg;.jfif",
1499 },
1500 { &CLSID_WICPngEncoder,
1501 "The Wine Project",
1502 "PNG Encoder",
1503 "1.0.0.0",
1504 &GUID_VendorMicrosoft,
1505 &GUID_ContainerFormatPng,
1506 "image/png",
1507 ".png",
1509 },
1510 { &CLSID_WICTiffEncoder,
1511 "The Wine Project",
1512 "TIFF Encoder",
1513 "1.0.0.0",
1514 &GUID_VendorMicrosoft,
1515 &GUID_ContainerFormatTiff,
1516 "image/tiff",
1517 ".tif;.tiff",
1519 },
1520 { NULL } /* list terminator */
1521};
1522
1523static GUID const * const converter_formats[] = {
1524 &GUID_WICPixelFormat1bppIndexed,
1525 &GUID_WICPixelFormat2bppIndexed,
1526 &GUID_WICPixelFormat4bppIndexed,
1527 &GUID_WICPixelFormat8bppIndexed,
1528 &GUID_WICPixelFormatBlackWhite,
1529 &GUID_WICPixelFormat2bppGray,
1530 &GUID_WICPixelFormat4bppGray,
1531 &GUID_WICPixelFormat8bppGray,
1532 &GUID_WICPixelFormat16bppGray,
1533 &GUID_WICPixelFormat16bppBGR555,
1534 &GUID_WICPixelFormat16bppBGR565,
1535 &GUID_WICPixelFormat16bppBGRA5551,
1536 &GUID_WICPixelFormat24bppBGR,
1537 &GUID_WICPixelFormat24bppRGB,
1538 &GUID_WICPixelFormat32bppBGR,
1539 &GUID_WICPixelFormat32bppRGB,
1540 &GUID_WICPixelFormat32bppBGRA,
1541 &GUID_WICPixelFormat32bppRGBA,
1542 &GUID_WICPixelFormat32bppPBGRA,
1543 &GUID_WICPixelFormat32bppPRGBA,
1544 &GUID_WICPixelFormat32bppGrayFloat,
1545 &GUID_WICPixelFormat48bppRGB,
1546 &GUID_WICPixelFormat64bppRGBA,
1547 &GUID_WICPixelFormat32bppCMYK,
1548 NULL
1549};
1550
1552 { &CLSID_WICDefaultFormatConverter,
1553 "The Wine Project",
1554 "Default Pixel Format Converter",
1555 "1.0.0.0",
1556 &GUID_VendorMicrosoft,
1558 },
1559 { NULL } /* list terminator */
1560};
1561
1562static const BYTE no_magic[1] = { 0 };
1563static const BYTE no_mask[1] = { 0 };
1564
1566 { 0, 1, no_magic, no_mask, 0 },
1567 { 0 }
1568};
1569
1570static const struct reader_containers ifd_containers[] = {
1571 {
1572 &GUID_ContainerFormatTiff,
1574 },
1575 { NULL } /* list terminator */
1576};
1577
1578static const BYTE tEXt[] = "tEXt";
1579
1581 { 4, 4, tEXt, mask_all, 4 },
1582 { 0 }
1583};
1584
1585static const struct reader_containers pngtext_containers[] = {
1586 {
1587 &GUID_ContainerFormatPng,
1589 },
1590 { NULL } /* list terminator */
1591};
1592
1593static const BYTE gAMA[] = "gAMA";
1594
1596 { 4, 4, gAMA, mask_all, 4 },
1597 { 0 }
1598};
1599
1600static const struct reader_containers pnggama_containers[] = {
1601 {
1602 &GUID_ContainerFormatPng,
1604 },
1605 { NULL } /* list terminator */
1606};
1607
1608static const BYTE cHRM[] = "cHRM";
1609
1611 { 4, 4, cHRM, mask_all, 4 },
1612 { 0 }
1613};
1614
1615static const struct reader_containers pngchrm_containers[] = {
1616 {
1617 &GUID_ContainerFormatPng,
1619 },
1620 { NULL } /* list terminator */
1621};
1622
1623static const BYTE hIST[] = "hIST";
1624
1626 { 4, 4, hIST, mask_all, 4 },
1627 { 0 }
1628};
1629
1630static const struct reader_containers pnghist_containers[] = {
1631 {
1632 &GUID_ContainerFormatPng,
1634 },
1635 { NULL } /* list terminator */
1636};
1637
1638static const BYTE tIME[] = "tIME";
1639
1641 { 4, 4, tIME, mask_all, 4 },
1642 { 0 }
1643};
1644
1645static const struct reader_containers pngtime_containers[] = {
1646 {
1647 &GUID_ContainerFormatPng,
1649 },
1650 { NULL } /* list terminator */
1651};
1652
1654 { 0, 6, gif87a_magic, mask_all, 0 },
1655 { 0, 6, gif89a_magic, mask_all, 0 },
1656 { 0 }
1657};
1658
1659static const struct reader_containers lsd_containers[] = {
1660 {
1661 &GUID_ContainerFormatGif,
1663 },
1664 { NULL } /* list terminator */
1665};
1666
1667static const BYTE imd_magic[] = { 0x2c };
1668
1670 { 0, 1, imd_magic, mask_all, 1 },
1671 { 0 }
1672};
1673
1674static const struct reader_containers imd_containers[] = {
1675 {
1676 &GUID_ContainerFormatGif,
1678 },
1679 { NULL } /* list terminator */
1680};
1681
1682static const BYTE gce_magic[] = { 0x21, 0xf9, 0x04 };
1683
1685 { 0, 3, gce_magic, mask_all, 3 },
1686 { 0 }
1687};
1688
1689static const struct reader_containers gce_containers[] = {
1690 {
1691 &GUID_ContainerFormatGif,
1693 },
1694 { NULL } /* list terminator */
1695};
1696
1697static const BYTE ape_magic[] = { 0x21, 0xff, 0x0b };
1698
1700 { 0, 3, ape_magic, mask_all, 0 },
1701 { 0 }
1702};
1703
1704static const struct reader_containers ape_containers[] = {
1705 {
1706 &GUID_ContainerFormatGif,
1708 },
1709 { NULL } /* list terminator */
1710};
1711
1712static const BYTE gif_comment_magic[] = { 0x21, 0xfe };
1713
1715 { 0, 2, gif_comment_magic, mask_all, 0 },
1716 { 0 }
1717};
1718
1720 {
1721 &GUID_ContainerFormatGif,
1723 },
1724 { NULL } /* list terminator */
1725};
1726
1728 { &CLSID_WICUnknownMetadataReader,
1729 "The Wine Project",
1730 "Unknown Metadata Reader",
1731 "1.0.0.0",
1732 "1.0.0.0",
1733 &GUID_VendorMicrosoft,
1734 &GUID_MetadataFormatUnknown,
1735 0, 0, 0,
1736 NULL
1737 },
1738 { &CLSID_WICIfdMetadataReader,
1739 "The Wine Project",
1740 "Ifd Reader",
1741 "1.0.0.0",
1742 "1.0.0.0",
1743 &GUID_VendorMicrosoft,
1744 &GUID_MetadataFormatIfd,
1745 1, 1, 0,
1747 },
1748 { &CLSID_WICPngChrmMetadataReader,
1749 "The Wine Project",
1750 "Chunk cHRM Reader",
1751 "1.0.0.0",
1752 "1.0.0.0",
1753 &GUID_VendorMicrosoft,
1754 &GUID_MetadataFormatChunkcHRM,
1755 0, 0, 0,
1757 },
1758 { &CLSID_WICPngGamaMetadataReader,
1759 "The Wine Project",
1760 "Chunk gAMA Reader",
1761 "1.0.0.0",
1762 "1.0.0.0",
1763 &GUID_VendorMicrosoft,
1764 &GUID_MetadataFormatChunkgAMA,
1765 0, 0, 0,
1767 },
1768 { &CLSID_WICPngHistMetadataReader,
1769 "The Wine Project",
1770 "Chunk hIST Reader",
1771 "1.0.0.0",
1772 "1.0.0.0",
1773 &GUID_VendorMicrosoft,
1774 &GUID_MetadataFormatChunkhIST,
1775 0, 0, 0,
1777 },
1778 { &CLSID_WICPngTextMetadataReader,
1779 "The Wine Project",
1780 "Chunk tEXt Reader",
1781 "1.0.0.0",
1782 "1.0.0.0",
1783 &GUID_VendorMicrosoft,
1784 &GUID_MetadataFormatChunktEXt,
1785 0, 0, 0,
1787 },
1788 { &CLSID_WICPngTimeMetadataReader,
1789 "The Wine Project",
1790 "Chunk tIME Reader",
1791 "1.0.0.0",
1792 "1.0.0.0",
1793 &GUID_VendorMicrosoft,
1794 &GUID_MetadataFormatChunktIME,
1795 0, 0, 0,
1797 },
1798 { &CLSID_WICLSDMetadataReader,
1799 "The Wine Project",
1800 "Logical Screen Descriptor Reader",
1801 "1.0.0.0",
1802 "1.0.0.0",
1803 &GUID_VendorMicrosoft,
1804 &GUID_MetadataFormatLSD,
1805 0, 0, 0,
1807 },
1808 { &CLSID_WICIMDMetadataReader,
1809 "The Wine Project",
1810 "Image Descriptor Reader",
1811 "1.0.0.0",
1812 "1.0.0.0",
1813 &GUID_VendorMicrosoft,
1814 &GUID_MetadataFormatIMD,
1815 0, 0, 0,
1817 },
1818 { &CLSID_WICGCEMetadataReader,
1819 "The Wine Project",
1820 "Graphic Control Extension Reader",
1821 "1.0.0.0",
1822 "1.0.0.0",
1823 &GUID_VendorMicrosoft,
1824 &GUID_MetadataFormatGCE,
1825 0, 0, 0,
1827 },
1828 { &CLSID_WICAPEMetadataReader,
1829 "The Wine Project",
1830 "Application Extension Reader",
1831 "1.0.0.0",
1832 "1.0.0.0",
1833 &GUID_VendorMicrosoft,
1834 &GUID_MetadataFormatAPE,
1835 0, 0, 0,
1837 },
1838 { &CLSID_WICGifCommentMetadataReader,
1839 "The Wine Project",
1840 "Comment Extension Reader",
1841 "1.0.0.0",
1842 "1.0.0.0",
1843 &GUID_VendorMicrosoft,
1844 &GUID_MetadataFormatGifComment,
1845 0, 0, 0,
1847 },
1848 { NULL } /* list terminator */
1849};
1850
1851static BYTE const channel_mask_1bit[] = { 0x01 };
1852static BYTE const channel_mask_2bit[] = { 0x03 };
1853static BYTE const channel_mask_4bit[] = { 0x0f };
1854
1855static BYTE const channel_mask_8bit[] = { 0xff, 0x00, 0x00, 0x00 };
1856static BYTE const channel_mask_8bit2[] = { 0x00, 0xff, 0x00, 0x00 };
1857static BYTE const channel_mask_8bit3[] = { 0x00, 0x00, 0xff, 0x00 };
1858static BYTE const channel_mask_8bit4[] = { 0x00, 0x00, 0x00, 0xff };
1859
1860static BYTE const channel_mask_16bit[] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
1861static BYTE const channel_mask_16bit2[] = { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 };
1862static BYTE const channel_mask_16bit3[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
1863static BYTE const channel_mask_16bit4[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff };
1864
1865static BYTE const channel_mask_32bit[] = { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 };
1866
1867static BYTE const channel_mask_96bit1[] = { 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
1868static BYTE const channel_mask_96bit2[] = { 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00 };
1869static BYTE const channel_mask_96bit3[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff };
1870
1871static BYTE const channel_mask_128bit1[] = { 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
1872static BYTE const channel_mask_128bit2[] = { 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
1873static BYTE const channel_mask_128bit3[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00 };
1874static BYTE const channel_mask_128bit4[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff };
1875
1876static BYTE const channel_mask_5bit[] = { 0x1f, 0x00 };
1877static BYTE const channel_mask_5bit2[] = { 0xe0, 0x03 };
1878static BYTE const channel_mask_5bit3[] = { 0x00, 0x7c };
1879static BYTE const channel_mask_5bit4[] = { 0x00, 0x80 };
1880
1881static BYTE const channel_mask_BGR565_2[] = { 0xe0, 0x07 };
1882static BYTE const channel_mask_BGR565_3[] = { 0x00, 0xf8 };
1883
1884static BYTE const * const channel_masks_1bit[] = { channel_mask_1bit };
1885static BYTE const * const channel_masks_2bit[] = { channel_mask_2bit };
1886static BYTE const * const channel_masks_4bit[] = { channel_mask_4bit };
1887static BYTE const * const channel_masks_8bit[] = { channel_mask_8bit,
1891
1892static BYTE const * const channel_masks_32bit[] = { channel_mask_32bit };
1895
1898
1901
1903 { &GUID_WICPixelFormat1bppIndexed,
1904 "The Wine Project",
1905 "1bpp Indexed",
1906 NULL, /* no version */
1907 &GUID_VendorMicrosoft,
1908 1, /* bitsperpixel */
1909 1, /* channel count */
1912 0
1913 },
1914 { &GUID_WICPixelFormat2bppIndexed,
1915 "The Wine Project",
1916 "2bpp Indexed",
1917 NULL, /* no version */
1918 &GUID_VendorMicrosoft,
1919 2, /* bitsperpixel */
1920 1, /* channel count */
1923 0
1924 },
1925 { &GUID_WICPixelFormat4bppIndexed,
1926 "The Wine Project",
1927 "4bpp Indexed",
1928 NULL, /* no version */
1929 &GUID_VendorMicrosoft,
1930 4, /* bitsperpixel */
1931 1, /* channel count */
1934 0
1935 },
1936 { &GUID_WICPixelFormat8bppIndexed,
1937 "The Wine Project",
1938 "8bpp Indexed",
1939 NULL, /* no version */
1940 &GUID_VendorMicrosoft,
1941 8, /* bitsperpixel */
1942 1, /* channel count */
1945 0
1946 },
1947 { &GUID_WICPixelFormatBlackWhite,
1948 "The Wine Project",
1949 "Black and White",
1950 NULL, /* no version */
1951 &GUID_VendorMicrosoft,
1952 1, /* bitsperpixel */
1953 1, /* channel count */
1956 0
1957 },
1958 { &GUID_WICPixelFormat2bppGray,
1959 "The Wine Project",
1960 "2bpp Grayscale",
1961 NULL, /* no version */
1962 &GUID_VendorMicrosoft,
1963 2, /* bitsperpixel */
1964 1, /* channel count */
1967 0
1968 },
1969 { &GUID_WICPixelFormat4bppGray,
1970 "The Wine Project",
1971 "4bpp Grayscale",
1972 NULL, /* no version */
1973 &GUID_VendorMicrosoft,
1974 4, /* bitsperpixel */
1975 1, /* channel count */
1978 0
1979 },
1980 { &GUID_WICPixelFormat8bppGray,
1981 "The Wine Project",
1982 "8bpp Grayscale",
1983 NULL, /* no version */
1984 &GUID_VendorMicrosoft,
1985 8, /* bitsperpixel */
1986 1, /* channel count */
1989 0
1990 },
1991 { &GUID_WICPixelFormat16bppGray,
1992 "The Wine Project",
1993 "16bpp Grayscale",
1994 NULL, /* no version */
1995 &GUID_VendorMicrosoft,
1996 16, /* bitsperpixel */
1997 1, /* channel count */
2000 0
2001 },
2002 { &GUID_WICPixelFormat16bppBGR555,
2003 "The Wine Project",
2004 "16bpp BGR555",
2005 NULL, /* no version */
2006 &GUID_VendorMicrosoft,
2007 16, /* bitsperpixel */
2008 3, /* channel count */
2011 0
2012 },
2013 { &GUID_WICPixelFormat16bppBGR565,
2014 "The Wine Project",
2015 "16bpp BGR565",
2016 NULL, /* no version */
2017 &GUID_VendorMicrosoft,
2018 16, /* bitsperpixel */
2019 3, /* channel count */
2022 0
2023 },
2024 { &GUID_WICPixelFormat16bppBGRA5551,
2025 "The Wine Project",
2026 "16bpp BGRA5551",
2027 NULL, /* no version */
2028 &GUID_VendorMicrosoft,
2029 16, /* bitsperpixel */
2030 4, /* channel count */
2033 1
2034 },
2035 { &GUID_WICPixelFormat24bppBGR,
2036 "The Wine Project",
2037 "24bpp BGR",
2038 NULL, /* no version */
2039 &GUID_VendorMicrosoft,
2040 24, /* bitsperpixel */
2041 3, /* channel count */
2044 0
2045 },
2046 { &GUID_WICPixelFormat24bppRGB,
2047 "The Wine Project",
2048 "24bpp RGB",
2049 NULL, /* no version */
2050 &GUID_VendorMicrosoft,
2051 24, /* bitsperpixel */
2052 3, /* channel count */
2055 0
2056 },
2057 { &GUID_WICPixelFormat32bppBGR,
2058 "The Wine Project",
2059 "32bpp BGR",
2060 NULL, /* no version */
2061 &GUID_VendorMicrosoft,
2062 32, /* bitsperpixel */
2063 3, /* channel count */
2066 0
2067 },
2068 { &GUID_WICPixelFormat32bppRGB,
2069 "The Wine Project",
2070 "32bpp RGB",
2071 NULL, /* no version */
2072 &GUID_VendorMicrosoft,
2073 32, /* bitsperpixel */
2074 3, /* channel count */
2077 0
2078 },
2079 { &GUID_WICPixelFormat32bppBGRA,
2080 "The Wine Project",
2081 "32bpp BGRA",
2082 NULL, /* no version */
2083 &GUID_VendorMicrosoft,
2084 32, /* bitsperpixel */
2085 4, /* channel count */
2088 1
2089 },
2090 { &GUID_WICPixelFormat32bppRGBA,
2091 "The Wine Project",
2092 "32bpp RGBA",
2093 NULL, /* no version */
2094 &GUID_VendorMicrosoft,
2095 32, /* bitsperpixel */
2096 4, /* channel count */
2099 1
2100 },
2101 { &GUID_WICPixelFormat32bppPBGRA,
2102 "The Wine Project",
2103 "32bpp PBGRA",
2104 NULL, /* no version */
2105 &GUID_VendorMicrosoft,
2106 32, /* bitsperpixel */
2107 4, /* channel count */
2110 1
2111 },
2112 { &GUID_WICPixelFormat32bppPRGBA,
2113 "The Wine Project",
2114 "32bpp PRGBA",
2115 NULL, /* no version */
2116 &GUID_VendorMicrosoft,
2117 32, /* bitsperpixel */
2118 4, /* channel count */
2121 1
2122 },
2123 { &GUID_WICPixelFormat32bppGrayFloat,
2124 "The Wine Project",
2125 "32bpp GrayFloat",
2126 NULL, /* no version */
2127 &GUID_VendorMicrosoft,
2128 32, /* bitsperpixel */
2129 1, /* channel count */
2132 0
2133 },
2134 { &GUID_WICPixelFormat48bppRGB,
2135 "The Wine Project",
2136 "48bpp RGB",
2137 NULL, /* no version */
2138 &GUID_VendorMicrosoft,
2139 48, /* bitsperpixel */
2140 3, /* channel count */
2143 0
2144 },
2145 { &GUID_WICPixelFormat64bppRGBA,
2146 "The Wine Project",
2147 "64bpp RGBA",
2148 NULL, /* no version */
2149 &GUID_VendorMicrosoft,
2150 64, /* bitsperpixel */
2151 4, /* channel count */
2154 1
2155 },
2156 { &GUID_WICPixelFormat64bppPRGBA,
2157 "The Wine Project",
2158 "64bpp PRGBA",
2159 NULL, /* no version */
2160 &GUID_VendorMicrosoft,
2161 64, /* bitsperpixel */
2162 4, /* channel count */
2165 1
2166 },
2167 { &GUID_WICPixelFormat32bppCMYK,
2168 "The Wine Project",
2169 "32bpp CMYK",
2170 NULL, /* no version */
2171 &GUID_VendorMicrosoft,
2172 32, /* bitsperpixel */
2173 4, /* channel count */
2176 0
2177 },
2178 { &GUID_WICPixelFormat64bppCMYK,
2179 "The Wine Project",
2180 "64bpp CMYK",
2181 NULL, /* no version */
2182 &GUID_VendorMicrosoft,
2183 64, /* bitsperpixel */
2184 4, /* channel count */
2187 0
2188 },
2189 { &GUID_WICPixelFormat96bppRGBFloat,
2190 "The Wine Project",
2191 "96bpp RGBFloat",
2192 NULL, /* no version */
2193 &GUID_VendorMicrosoft,
2194 96, /* bitsperpixel */
2195 3, /* channel count */
2198 0
2199 },
2200 { &GUID_WICPixelFormat128bppRGBAFloat,
2201 "The Wine Project",
2202 "128bpp RGBAFloat",
2203 NULL, /* no version */
2204 &GUID_VendorMicrosoft,
2205 128, /* bitsperpixel */
2206 4, /* channel count */
2209 1
2210 },
2211 { &GUID_WICPixelFormat128bppPRGBAFloat,
2212 "The Wine Project",
2213 "128bpp PRGBAFloat",
2214 NULL, /* no version */
2215 &GUID_VendorMicrosoft,
2216 128, /* bitsperpixel */
2217 4, /* channel count */
2220 1
2221 },
2222 { NULL } /* list terminator */
2223};
2224
2226{
2227 const CLSID *clsid; /* NULL for end of list */
2228};
2229
2230static const struct regsvr_category category_list[] = {
2231 { &CATID_WICBitmapDecoders },
2232 { &CATID_WICBitmapEncoders },
2233 { &CATID_WICFormatConverters },
2234 { &CATID_WICMetadataReader },
2235 { &CATID_WICPixelFormats },
2236 { NULL }
2237};
2238
2240{
2241 LONG res;
2242 WCHAR buf[39];
2243 HKEY coclass_key, categories_key, instance_key;
2244
2246 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
2247 if (res != ERROR_SUCCESS) return HRESULT_FROM_WIN32(res);
2248
2249 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2250 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
2251 KEY_READ | KEY_WRITE, NULL, &categories_key, NULL);
2252 if (res != ERROR_SUCCESS)
2253 {
2254 RegCloseKey(coclass_key);
2255 return HRESULT_FROM_WIN32(res);
2256 }
2257
2258 res = RegCreateKeyExW(categories_key, instance_keyname, 0, NULL, 0,
2259 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
2260
2261 for (; res == ERROR_SUCCESS && list->clsid; list++)
2262 {
2263 HKEY instance_clsid_key;
2264
2265 StringFromGUID2(list->clsid, buf, 39);
2266 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
2267 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
2268 if (res == ERROR_SUCCESS)
2269 {
2270 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
2271 (const BYTE *)buf, 78);
2272 RegCloseKey(instance_clsid_key);
2273 }
2274 }
2275
2276 RegCloseKey(instance_key);
2277 RegCloseKey(categories_key);
2278 RegCloseKey(coclass_key);
2279
2281}
2282
2284{
2285 LONG res;
2286 WCHAR buf[39];
2287 HKEY coclass_key, categories_key, instance_key;
2288
2290 KEY_READ | KEY_WRITE, &coclass_key);
2291 if (res != ERROR_SUCCESS) return HRESULT_FROM_WIN32(res);
2292
2293 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2294 res = RegOpenKeyExW(coclass_key, buf, 0,
2295 KEY_READ | KEY_WRITE, &categories_key);
2296 if (res != ERROR_SUCCESS)
2297 {
2299 RegCloseKey(coclass_key);
2300 return HRESULT_FROM_WIN32(res);
2301 }
2302
2303 res = RegOpenKeyExW(categories_key, instance_keyname, 0,
2304 KEY_READ | KEY_WRITE, &instance_key);
2305
2306 for (; res == ERROR_SUCCESS && list->clsid; list++)
2307 {
2308 StringFromGUID2(list->clsid, buf, 39);
2309 res = RegDeleteTreeW(instance_key, buf);
2310 }
2311
2312 RegCloseKey(instance_key);
2313 RegCloseKey(categories_key);
2314
2315 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2316 res = RegDeleteTreeW(coclass_key, buf);
2317
2318 RegCloseKey(coclass_key);
2319
2321}
2322
2325
2327{
2328 HRESULT hr;
2329
2330 TRACE("\n");
2331
2333 if (SUCCEEDED(hr))
2335 if (SUCCEEDED(hr))
2337 if (SUCCEEDED(hr))
2339 if (SUCCEEDED(hr))
2341 if (SUCCEEDED(hr))
2343 if (SUCCEEDED(hr))
2345 return hr;
2346}
2347
2349{
2350 HRESULT hr;
2351
2352 TRACE("\n");
2353
2355 if (SUCCEEDED(hr))
2357 if (SUCCEEDED(hr))
2359 if (SUCCEEDED(hr))
2361 if (SUCCEEDED(hr))
2363 if (SUCCEEDED(hr))
2365 if (SUCCEEDED(hr))
2367 return hr;
2368}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: list.h:37
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT WINAPI DllRegisterServer(void)
Definition: regsvr.c:484
static WCHAR const clsid_keyname[6]
Definition: regsvr.c:78
HRESULT WINAPI DllUnregisterServer(void)
Definition: regsvr.c:497
#define NULL
Definition: types.h:112
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
#define swprintf
Definition: precomp.h:40
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
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
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define REG_SZ
Definition: layer.c:22
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
unsigned int UINT
Definition: ndis.h:50
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define list
Definition: rosglue.h:35
#define REG_DWORD
Definition: sdbapi.c:596
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
DWORD length
Definition: regsvr.c:44
const BYTE * mask
Definition: regsvr.c:47
const BYTE * pattern
Definition: regsvr.c:46
DWORD endofstream
Definition: regsvr.c:48
DWORD position
Definition: regsvr.c:45
Definition: format.c:58
DWORD position
Definition: regsvr.c:99
DWORD length
Definition: regsvr.c:100
const BYTE * mask
Definition: regsvr.c:102
const BYTE * pattern
Definition: regsvr.c:101
DWORD data_offset
Definition: regsvr.c:103
const struct metadata_pattern * patterns
Definition: regsvr.c:109
GUID const * format
Definition: regsvr.c:108
const CLSID * clsid
Definition: regsvr.c:2227
LPCSTR author
Definition: regsvr.c:87
LPCSTR version
Definition: regsvr.c:89
GUID const * vendor
Definition: regsvr.c:90
LPCSTR friendlyname
Definition: regsvr.c:88
GUID const *const * formats
Definition: regsvr.c:91
CLSID const * clsid
Definition: regsvr.c:86
LPCSTR version
Definition: regsvr.c:56
LPCSTR friendlyname
Definition: regsvr.c:55
LPCSTR mimetypes
Definition: regsvr.c:59
GUID const * vendor
Definition: regsvr.c:57
GUID const *const * formats
Definition: regsvr.c:61
LPCSTR extensions
Definition: regsvr.c:60
GUID const * container_format
Definition: regsvr.c:58
LPCSTR author
Definition: regsvr.c:54
CLSID const * clsid
Definition: regsvr.c:53
const struct decoder_pattern * patterns
Definition: regsvr.c:62
GUID const *const * formats
Definition: regsvr.c:78
LPCSTR author
Definition: regsvr.c:71
GUID const * container_format
Definition: regsvr.c:75
CLSID const * clsid
Definition: regsvr.c:70
LPCSTR version
Definition: regsvr.c:73
LPCSTR friendlyname
Definition: regsvr.c:72
GUID const * vendor
Definition: regsvr.c:74
LPCSTR mimetypes
Definition: regsvr.c:76
LPCSTR extensions
Definition: regsvr.c:77
GUID const * vendor
Definition: regsvr.c:119
const struct reader_containers * containers
Definition: regsvr.c:124
GUID const * metadata_format
Definition: regsvr.c:120
DWORD supports_padding
Definition: regsvr.c:122
DWORD requires_fullstream
Definition: regsvr.c:121
DWORD requires_fixedsize
Definition: regsvr.c:123
CLSID const * clsid
Definition: regsvr.c:114
LPCSTR friendlyname
Definition: regsvr.c:134
BYTE const *const * channelmasks
Definition: regsvr.c:139
UINT supportsalpha
Definition: regsvr.c:141
CLSID const * clsid
Definition: regsvr.c:132
WICPixelFormatNumericRepresentation numericrepresentation
Definition: regsvr.c:140
LPCSTR version
Definition: regsvr.c:135
GUID const * vendor
Definition: regsvr.c:136
static BYTE const *const channel_masks_8bit[]
Definition: regsvr.c:1887
static const struct reader_containers gce_containers[]
Definition: regsvr.c:1689
static struct regsvr_converter const converter_list[]
Definition: regsvr.c:1551
static struct decoder_pattern const tga_patterns[]
Definition: regsvr.c:1312
static BYTE const channel_mask_4bit[]
Definition: regsvr.c:1853
static const struct metadata_pattern pngchrm_metadata_pattern[]
Definition: regsvr.c:1610
static const char position_valuename[]
Definition: regsvr.c:163
static HRESULT unregister_decoders(struct regsvr_decoder const *list)
Definition: regsvr.c:348
static BYTE const *const channel_masks_1bit[]
Definition: regsvr.c:1884
static const struct metadata_pattern pnghist_metadata_pattern[]
Definition: regsvr.c:1625
static BYTE const *const channel_masks_32bit[]
Definition: regsvr.c:1892
static GUID const *const png_formats[]
Definition: regsvr.c:1234
static const struct reader_containers pnghist_containers[]
Definition: regsvr.c:1630
static const struct reader_containers ape_containers[]
Definition: regsvr.c:1704
static GUID const *const ico_formats[]
Definition: regsvr.c:1166
static HRESULT unregister_metadatareaders(struct regsvr_metadatareader const *list)
Definition: regsvr.c:892
static const BYTE mask_all[]
Definition: regsvr.c:1116
static BYTE const *const channel_masks_96bit[]
Definition: regsvr.c:1893
static HRESULT register_converters(struct regsvr_converter const *list)
Definition: regsvr.c:576
static const WCHAR instance_keyname[]
Definition: regsvr.c:160
static GUID const *const bmp_formats[]
Definition: regsvr.c:1120
static const char author_valuename[]
Definition: regsvr.c:151
static BYTE const channel_mask_8bit4[]
Definition: regsvr.c:1858
static GUID const *const gif_formats[]
Definition: regsvr.c:1153
static BYTE const channel_mask_16bit[]
Definition: regsvr.c:1860
static HRESULT register_encoders(struct regsvr_encoder const *list)
Definition: regsvr.c:398
static const struct reader_containers pngchrm_containers[]
Definition: regsvr.c:1615
static const char friendlyname_valuename[]
Definition: regsvr.c:152
static struct decoder_pattern const dds_patterns[]
Definition: regsvr.c:1145
static const char mimetypes_valuename[]
Definition: regsvr.c:156
static const BYTE wmp_magic_v1[]
Definition: regsvr.c:1191
static HRESULT unregister_converters(struct regsvr_converter const *list)
Definition: regsvr.c:683
static const char bitsperpixel_valuename[]
Definition: regsvr.c:175
static const BYTE tga_footer_magic[18]
Definition: regsvr.c:1290
static BYTE const channel_mask_8bit[]
Definition: regsvr.c:1855
static const WCHAR containerformat_valuename[]
Definition: regsvr.c:154
static const char specversion_valuename[]
Definition: regsvr.c:169
static const struct reader_containers pngtext_containers[]
Definition: regsvr.c:1585
static const BYTE ico_magic[]
Definition: regsvr.c:1164
static GUID const *const tiff_decode_formats[]
Definition: regsvr.c:1259
static BYTE const channel_mask_2bit[]
Definition: regsvr.c:1852
static GUID const *const wmp_formats[]
Definition: regsvr.c:1193
static const BYTE imd_magic[]
Definition: regsvr.c:1667
static const struct reader_containers pngtime_containers[]
Definition: regsvr.c:1645
static BYTE const channel_mask_8bit3[]
Definition: regsvr.c:1857
static const char endofstream_valuename[]
Definition: regsvr.c:166
static BYTE const *const channel_masks_16bit[]
Definition: regsvr.c:1889
static BYTE const *const channel_masks_BGR565[]
Definition: regsvr.c:1899
HRESULT WINAPI WIC_DllRegisterServer(void)
static const WCHAR channelmasks_keyname[]
Definition: regsvr.c:179
static BYTE const channel_mask_1bit[]
Definition: regsvr.c:1851
static GUID const *const tga_formats[]
Definition: regsvr.c:1301
static const struct metadata_pattern gce_metadata_pattern[]
Definition: regsvr.c:1684
static const BYTE dds_magic[]
Definition: regsvr.c:1138
static GUID const *const tiff_encode_formats[]
Definition: regsvr.c:1453
static const char requiresfullstream_valuename[]
Definition: regsvr.c:170
static BYTE const channel_mask_128bit1[]
Definition: regsvr.c:1871
static const BYTE cHRM[]
Definition: regsvr.c:1608
static GUID const *const dds_formats[]
Definition: regsvr.c:1140
static BYTE const *const channel_masks_2bit[]
Definition: regsvr.c:1885
static BYTE const channel_mask_96bit1[]
Definition: regsvr.c:1867
static BYTE const channel_mask_16bit2[]
Definition: regsvr.c:1861
static BYTE const channel_mask_128bit3[]
Definition: regsvr.c:1873
static BYTE const *const channel_masks_BGRA5551[]
Definition: regsvr.c:1896
static struct decoder_pattern const jpeg_patterns[]
Definition: regsvr.c:1185
static const char channelcount_valuename[]
Definition: regsvr.c:176
static BYTE const channel_mask_128bit2[]
Definition: regsvr.c:1872
static HRESULT register_decoders(struct regsvr_decoder const *list)
Definition: regsvr.c:184
static HRESULT unregister_pixelformats(struct regsvr_pixelformat const *list)
Definition: regsvr.c:1066
static const struct metadata_pattern imd_metadata_pattern[]
Definition: regsvr.c:1669
static GUID const *const jpeg_formats[]
Definition: regsvr.c:1178
static const WCHAR formats_keyname[]
Definition: regsvr.c:158
static const char dataoffset_valuename[]
Definition: regsvr.c:174
static struct regsvr_encoder const encoder_list[]
Definition: regsvr.c:1469
static const BYTE wmp_magic_v0[]
Definition: regsvr.c:1190
static GUID const *const converter_formats[]
Definition: regsvr.c:1523
static const BYTE tga_indexed_magic[18]
Definition: regsvr.c:1292
static const BYTE no_mask[1]
Definition: regsvr.c:1563
static const char pattern_valuename[]
Definition: regsvr.c:164
static BYTE const channel_mask_5bit2[]
Definition: regsvr.c:1877
static const struct metadata_pattern ifd_metadata_pattern[]
Definition: regsvr.c:1565
static GUID const *const bmp_encode_formats[]
Definition: regsvr.c:1423
static BYTE const channel_mask_5bit[]
Definition: regsvr.c:1876
static const BYTE tiff_magic_be[]
Definition: regsvr.c:1257
static BYTE const channel_mask_96bit3[]
Definition: regsvr.c:1869
static const BYTE tEXt[]
Definition: regsvr.c:1578
static struct regsvr_pixelformat const pixelformat_list[]
Definition: regsvr.c:1902
static BYTE const *const channel_masks_128bit[]
Definition: regsvr.c:1894
static struct decoder_pattern const bmp_patterns[]
Definition: regsvr.c:1133
static const struct reader_containers pnggama_containers[]
Definition: regsvr.c:1600
static struct decoder_pattern const wmp_patterns[]
Definition: regsvr.c:1226
static const BYTE png_magic[]
Definition: regsvr.c:1232
HRESULT WINAPI WIC_DllUnregisterServer(void)
static const struct metadata_pattern pngtext_metadata_pattern[]
Definition: regsvr.c:1580
static BYTE const channel_mask_5bit4[]
Definition: regsvr.c:1879
static const struct metadata_pattern lsd_metadata_patterns[]
Definition: regsvr.c:1653
static BYTE const channel_mask_16bit4[]
Definition: regsvr.c:1863
static const BYTE tIME[]
Definition: regsvr.c:1638
static BYTE const channel_mask_8bit2[]
Definition: regsvr.c:1856
static const WCHAR vendor_valuename[]
Definition: regsvr.c:153
static BYTE const *const channel_masks_4bit[]
Definition: regsvr.c:1886
static struct decoder_pattern const gif_patterns[]
Definition: regsvr.c:1158
static const BYTE tga_grayscale_magic[18]
Definition: regsvr.c:1298
static const BYTE tga_grayscale_mask[18]
Definition: regsvr.c:1299
static struct decoder_pattern const tiff_patterns[]
Definition: regsvr.c:1284
static const struct reader_containers imd_containers[]
Definition: regsvr.c:1674
static const BYTE gif87a_magic[6]
Definition: regsvr.c:1150
static struct regsvr_metadatareader const metadatareader_list[]
Definition: regsvr.c:1727
static const BYTE hIST[]
Definition: regsvr.c:1623
static const struct metadata_pattern pnggama_metadata_pattern[]
Definition: regsvr.c:1595
static const struct metadata_pattern pngtime_metadata_pattern[]
Definition: regsvr.c:1640
static const BYTE tiff_magic_le[]
Definition: regsvr.c:1256
static const BYTE no_magic[1]
Definition: regsvr.c:1562
static BYTE const channel_mask_5bit3[]
Definition: regsvr.c:1878
static const char requiresfixedsize_valuename[]
Definition: regsvr.c:172
static const BYTE gif_comment_magic[]
Definition: regsvr.c:1712
static const struct reader_containers gif_comment_containers[]
Definition: regsvr.c:1719
static const BYTE ape_magic[]
Definition: regsvr.c:1697
static const BYTE tga_truecolor_mask[18]
Definition: regsvr.c:1296
static const BYTE gif89a_magic[6]
Definition: regsvr.c:1151
static const struct reader_containers ifd_containers[]
Definition: regsvr.c:1570
static const struct metadata_pattern ape_metadata_pattern[]
Definition: regsvr.c:1699
static struct regsvr_decoder const decoder_list[]
Definition: regsvr.c:1320
static const char numericrepresentation_valuename[]
Definition: regsvr.c:177
static BYTE const channel_mask_BGR565_3[]
Definition: regsvr.c:1882
static const WCHAR containers_keyname[]
Definition: regsvr.c:173
static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list)
Definition: regsvr.c:733
static const char version_valuename[]
Definition: regsvr.c:155
static GUID const *const png_encode_formats[]
Definition: regsvr.c:1435
static BYTE const channel_mask_96bit2[]
Definition: regsvr.c:1868
static HRESULT register_categories(const struct regsvr_category *list)
Definition: regsvr.c:2239
static const BYTE jpeg_magic[]
Definition: regsvr.c:1176
static const WCHAR metadataformat_valuename[]
Definition: regsvr.c:168
static const char supportstransparency_valuename[]
Definition: regsvr.c:178
static struct decoder_pattern const ico_patterns[]
Definition: regsvr.c:1171
static struct decoder_pattern const png_patterns[]
Definition: regsvr.c:1251
static const char extensions_valuename[]
Definition: regsvr.c:157
static const WCHAR clsid_valuename[]
Definition: regsvr.c:161
static BYTE const channel_mask_128bit4[]
Definition: regsvr.c:1874
static BYTE const channel_mask_32bit[]
Definition: regsvr.c:1865
static const struct reader_containers lsd_containers[]
Definition: regsvr.c:1659
static const char length_valuename[]
Definition: regsvr.c:162
static const WCHAR patterns_keyname[]
Definition: regsvr.c:159
static const BYTE tga_indexed_mask[18]
Definition: regsvr.c:1293
static const BYTE tga_truecolor_magic[18]
Definition: regsvr.c:1295
static const struct regsvr_category category_list[]
Definition: regsvr.c:2230
static HRESULT unregister_encoders(struct regsvr_encoder const *list)
Definition: regsvr.c:526
static const struct metadata_pattern gif_comment_metadata_pattern[]
Definition: regsvr.c:1714
static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
Definition: regsvr.c:942
static BYTE const channel_mask_BGR565_2[]
Definition: regsvr.c:1881
static const BYTE bmp_magic[]
Definition: regsvr.c:1118
static const WCHAR pixelformats_keyname[]
Definition: regsvr.c:167
static const char mask_valuename[]
Definition: regsvr.c:165
static const char supportspadding_valuename[]
Definition: regsvr.c:171
static BYTE const channel_mask_16bit3[]
Definition: regsvr.c:1862
static HRESULT unregister_categories(const struct regsvr_category *list)
Definition: regsvr.c:2283
static const BYTE gce_magic[]
Definition: regsvr.c:1682
static const BYTE gAMA[]
Definition: regsvr.c:1593
WICPixelFormatNumericRepresentation
Definition: wincodec.idl:158
@ WICPixelFormatNumericRepresentationUnsignedInteger
Definition: wincodec.idl:161
@ WICPixelFormatNumericRepresentationIndexed
Definition: wincodec.idl:160
@ WICPixelFormatNumericRepresentationFloat
Definition: wincodec.idl:164
#define WINAPI
Definition: msvc.h:6
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193
#define const
Definition: zconf.h:233