43#define WMF_PLACEABLE_KEY 0x9ac6cdd7
76 hr = IWICImagingFactory_CreatePalette(
factory, &wic_palette);
81 hr = IWICBitmapFrameDecode_CopyPalette(frame, wic_palette);
93 IWICPalette_GetColorCount(wic_palette, &
count);
97 IWICPalette_GetType(wic_palette, &
type);
116 IWICPalette_HasAlpha(wic_palette, &
alpha);
120 IWICPalette_Release(wic_palette);
122 IWICImagingFactory_Release(
factory);
136 hr = IWICImagingFactory_CreatePalette(
factory, &wic_palette);
137 IWICImagingFactory_Release(
factory);
143 hr = IWICBitmapFrameEncode_SetPalette(frame, wic_palette);
145 IWICPalette_Release(wic_palette);
154 FIXME(
"(%p %p %p %d %p %p): stub\n",
bitmap, effect, roi, useAuxData, auxData, auxDataSize);
166 FIXME(
"(%p %d %p %p %p %p %d %p %p): stub\n", inputBitmaps, numInputs, effect, roi, outputRect, outputBitmap, useAuxData, auxData, auxDataSize);
203 *
r = (pixel>>7&0xf8)|(pixel>>12&0x7);
204 *
g = (pixel>>2&0xf8)|(pixel>>6&0x7);
205 *
b = (pixel<<3&0xf8)|(pixel>>2&0x7);
213 *
r = (pixel>>8&0xf8)|(pixel>>13&0x7);
214 *
g = (pixel>>3&0xfc)|(pixel>>9&0x3);
215 *
b = (pixel<<3&0xf8)|(pixel>>2&0x7);
223 *
r = (pixel>>7&0xf8)|(pixel>>12&0x7);
224 *
g = (pixel>>2&0xf8)|(pixel>>6&0x7);
225 *
b = (pixel<<3&0xf8)|(pixel>>2&0x7);
226 if ((pixel&0x8000) == 0x8000)
271 DWORD scaled_q = (255 << 15) / *
a;
272 *
r = (
row[
x*4+2] > *
a) ? 0xff : (
row[
x*4+2] * scaled_q) >> 15;
273 *
g = (
row[
x*4+1] > *
a) ? 0xff : (
row[
x*4+1] * scaled_q) >> 15;
274 *
b = (
row[
x*4] > *
a) ? 0xff : (
row[
x*4] * scaled_q) >> 15;
304 *
r =
row[
x*8+5] * 255 / *
a;
305 *
g =
row[
x*8+3] * 255 / *
a;
306 *
b =
row[
x*8+1] * 255 / *
a;
368 FIXME(
"not implemented for format 0x%x\n",
bitmap->format);
380static unsigned int absdiff(
unsigned int x,
unsigned int y)
382 return x >
y ?
x -
y :
y -
x;
388 int best_distance = 0x7fff;
489 r = (
r *
a + 127) / 255;
490 g = (
g *
a + 127) / 255;
491 b = (
b *
a + 127) / 255;
507 *((
UINT64*)(
row)+
x) = (a64<<56)|(a64<<48)|(r64<<40)|(r64<<32)|(g64<<24)|(g64<<16)|(
b64<<8)|
b64;
582 FIXME(
"not implemented for format 0x%x\n",
bitmap->format);
602 memcpy(dst_bits+dst_stride*
y, src_bits+src_stride*
y, widthbytes);
606#define convert_indexed_to_rgb(getpixel_function, setpixel_function) do { \
607 for (y=0; y<height; y++) \
608 for (x=0; x<width; x++) { \
611 BYTE *color = (BYTE *)&argb; \
612 getpixel_function(&index, src_bits+src_stride*y, x); \
613 argb = (src_palette && index < src_palette->Count) ? src_palette->Entries[index] : 0; \
614 setpixel_function(color[2], color[1], color[0], color[3], dst_bits+dst_stride*y, x); \
619#define convert_indexed_to_indexed(getpixel_function, setpixel_function) do { \
620 for (y=0; y<height; y++) \
621 for (x=0; x<width; x++) { \
624 BYTE *color = (BYTE *)&argb; \
625 getpixel_function(&index, src_bits+src_stride*y, x); \
626 argb = (src_palette && index < src_palette->Count) ? src_palette->Entries[index] : 0; \
627 setpixel_function(color[2], color[1], color[0], color[3], dst_bits+dst_stride*y, x, dst_palette); \
632#define convert_rgb_to_rgb(getpixel_function, setpixel_function) do { \
633 for (y=0; y<height; y++) \
634 for (x=0; x<width; x++) { \
636 getpixel_function(&r, &g, &b, &a, src_bits+src_stride*y, x); \
637 setpixel_function(r, g, b, a, dst_bits+dst_stride*y, x); \
642#define convert_rgb_to_indexed(getpixel_function, setpixel_function) do { \
643 for (y=0; y<height; y++) \
644 for (x=0; x<width; x++) { \
646 getpixel_function(&r, &g, &b, &a, src_bits+src_stride*y, x); \
647 setpixel_function(r, g, b, a, dst_bits+dst_stride*y, x, dst_palette); \
1093#undef convert_indexed_to_rgb
1094#undef convert_indexed_to_indexed
1095#undef convert_rgb_to_rgb
1096#undef convert_rgb_to_indexed
1116 if(!lockeddata || !
bitmap)
1132 act_rect.
X = act_rect.
Y = 0;
1139 WARN(
"bitmap is already locked and cannot be locked again\n");
1152 lockeddata->
Scan0 =
bitmap->bits + (bitspp / 8) * act_rect.
X +
1193 lockeddata->
Stride = (((act_rect.
Width * bitspp + 7) / 8) + 3) & ~3;
1212 FIXME(
"Cannot copy rows that don't start at a whole byte.\n");
1243 if (!
bitmap || xdpi == 0.0 || ydpi == 0.0)
1246 bitmap->image.xres = xdpi;
1247 bitmap->image.yres = ydpi;
1260 if(!
bitmap || !lockeddata)
1289 FIXME(
"Cannot copy rows that don't start at a whole byte.\n");
1302 ERR(
"failed to convert pixels; this should never happen\n");
1319 TRACE(
"(%f,%f,%f,%f,0x%x,%p,%p)\n",
x,
y,
width,
height,
format, srcBitmap, dstBitmap);
1325 TRACE(
"<-- InvalidParameter\n");
1342 (*dstBitmap)->image.palette, srcBitmap->
stride,
1360 free((*dstBitmap)->image.palette);
1361 (*dstBitmap)->image.palette = dst_palette;
1380 TRACE(
"(%i,%i,%i,%i,0x%x,%p,%p)\n",
x,
y,
width,
height,
format, srcBitmap, dstBitmap);
1389 if (!
image || !cloneImage)
1412 result->image.frame_count = 1;
1427 *cloneImage = &
result->image;
1432 WARN(
"GpImage with no image data (metafile in wrong state?)\n");
1480 stride = ((
info->bmiHeader.biWidth *
info->bmiHeader.biBitCount + 31) >> 3) & ~3;
1508 if(!lpBitmapName || !
bitmap)
1529 return ((
b + ((
BYTE)bkgnd * (255 -
alpha) + 127) / 255) |
1530 (
g + ((
BYTE)(bkgnd >> 8) * (255 -
alpha) + 127) / 255) << 8 |
1531 (
r + ((
BYTE)(bkgnd >> 16) * (255 -
alpha) + 127) / 255) << 16 |
1544 TRACE(
"(%p,%p,%lx)\n",
bitmap, hbmReturn, background);
1552 bih.
biSize =
sizeof(bih);
1581 if (background & 0xffffff)
1587 if ((*
ptr & 0xff000000) == 0xff000000)
continue;
1635 int mask_scanlines = 0, color_scanlines = 0;
1674 bih.
biSize =
sizeof(bih);
1709 if (!screendc || ((color_scanlines == 0 || mask_scanlines == 0) &&
1719 dst_row = lockeddata.
Scan0;
1729 *
dst++ |= 0xff000000;
1731 dst_row += lockeddata.
Stride;
1743 static const BYTE halftone_values[6]={0x00,0x33,0x66,0x99,0xcc,0xff};
1748 entries[
i] = 0xff000000;
1749 if (
i&1) entries[
i] |= 0x800000;
1750 if (
i&2) entries[
i] |= 0x8000;
1751 if (
i&4) entries[
i] |= 0x80;
1755 entries[
i] = 0xffc0c0c0;
1759 entries[
i] = 0xff000000;
1760 if (
i&1) entries[
i] |= 0xff0000;
1761 if (
i&2) entries[
i] |= 0xff00;
1762 if (
i&4) entries[
i] |= 0xff;
1772 entries[
i] = 0xff000000;
1773 entries[
i] |= halftone_values[(
i-40)%6];
1774 entries[
i] |= halftone_values[((
i-40)/6)%6] << 8;
1775 entries[
i] |= halftone_values[((
i-40)/36)%6] << 16;
1822 stride = (row_size + 3) & ~3;
1836 memcpy(&(*bitmap)->image.format, &ImageFormatMemoryBMP,
sizeof(
GUID));
1838 (*bitmap)->image.frame_count = 1;
1839 (*bitmap)->image.current_frame = 0;
1840 (*bitmap)->image.palette =
NULL;
1841 (*bitmap)->image.xres = xres;
1842 (*bitmap)->image.yres = yres;
1843 (*bitmap)->width =
width;
1844 (*bitmap)->height =
height;
1845 (*bitmap)->format =
format;
1846 (*bitmap)->image.decoder =
NULL;
1847 (*bitmap)->image.encoder =
NULL;
1848 (*bitmap)->bits =
bits;
1849 (*bitmap)->stride =
stride;
1850 (*bitmap)->own_bits = own_bits;
1851 (*bitmap)->metadata_reader =
NULL;
1852 (*bitmap)->prop_count = 0;
1853 (*bitmap)->prop_item =
NULL;
1865 if (!(*bitmap)->image.palette)
1877 (*bitmap)->image.palette->Entries[0] = 0xff000000;
1878 (*bitmap)->image.palette->Entries[1] = 0xffffffff;
1886 (*bitmap)->image.palette->Count);
1932 if(!
bitmap || !graphics || !cachedbmp)
1952 ULONG andstride, xorstride, bitssize;
1953 LPBYTE andbits, xorbits, androw, xorrow, srcrow;
1965 andstride = ((lockeddata.
Width+31)/32)*4;
1966 xorstride = lockeddata.
Width*4;
1967 bitssize = (andstride + xorstride) * lockeddata.
Height;
1969 andbits =
calloc(1, bitssize);
1973 xorbits = andbits + andstride * lockeddata.
Height;
1979 androw = andbits + andstride *
y;
1981 if (srcrow[3+4*
x] >= 128)
1982 androw[
x/8] |= 1 << (7-
x%8);
1984 xorrow = xorbits + xorstride *
y;
1985 memcpy(xorrow, srcrow, xorstride);
2004 TRACE(
"%p\n", cachedbmp);
2018 TRACE(
"%p %p %d %d\n", graphics, cachedbmp,
x,
y);
2020 if(!graphics || !cachedbmp)
2036 if (clobber_palette)
2039 dst->image.palette =
src->image.palette;
2044 dst->image.xres =
src->image.xres;
2045 dst->image.yres =
src->image.yres;
2047 dst->height =
src->height;
2048 dst->format =
src->format;
2050 dst->stride =
src->stride;
2051 dst->own_bits =
src->own_bits;
2052 if (
dst->metadata_reader)
2053 IWICMetadataReader_Release(
dst->metadata_reader);
2054 dst->metadata_reader =
src->metadata_reader;
2056 dst->prop_item =
src->prop_item;
2057 dst->prop_count =
src->prop_count;
2058 if (
dst->image.decoder)
2059 IWICBitmapDecoder_Release(
dst->image.decoder);
2060 dst->image.decoder =
src->image.decoder;
2062 dst->image.encoder =
src->image.encoder;
2063 dst->image.frame_count =
src->image.frame_count;
2064 dst->image.current_frame =
src->image.current_frame;
2065 dst->image.format =
src->image.format;
2067 src->image.type = ~0;
2081 IWICMetadataReader_Release(((
GpBitmap*)
image)->metadata_reader);
2092 IWICBitmapDecoder_Release(
image->decoder);
2123 FIXME(
"not implemented\n");
2135 FIXME(
"not implemented\n");
2143 TRACE(
"%p %p %p\n",
image, srcRect, srcUnit);
2145 if(!
image || !srcRect || !srcUnit)
2152 srcRect->
X = srcRect->
Y = 0.0;
2158 WARN(
"GpImage with no image data\n");
2162 TRACE(
"returning (%f, %f) (%f, %f) unit type %d\n", srcRect->
X, srcRect->
Y,
2187 WARN(
"GpImage with no image data\n");
2202 if(!
image || !graphics)
2227 WARN(
"GpImage with no image data\n");
2261 if (!
image->palette ||
image->palette->Count == 0)
2337 WARN(
"GpImage with no image data\n");
2375 ULONG items_returned;
2383 FIXME(
"Not implemented for type %d\n",
image->type);
2391 for (
i = 0;
i <
num;
i++)
2406 hr = IWICMetadataReader_GetCount(
reader, &prop_count);
2411 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
2414 IWICEnumMetadataItem_Reset(enumerator);
2416 for (
i = 0;
i <
num;
i++)
2420 hr = IWICEnumMetadataItem_Next(enumerator, 1,
NULL, &
id,
NULL, &items_returned);
2425 FIXME(
"not supported propvariant type for id: %u\n",
id.
vt);
2432 IWICEnumMetadataItem_Release(enumerator);
2446 return value->caub.cElems;
2450 return value->caui.cElems * 2;
2455 return value->caul.cElems * 4;
2460 return value->cauh.cElems * 8;
2464 return value->blob.cbSize;
2466 FIXME(
"not supported variant type %d\n",
value->vt);
2483 FIXME(
"Not implemented for type %d\n",
image->type);
2518#ifndef PropertyTagTypeSByte
2519#define PropertyTagTypeSByte 6
2520#define PropertyTagTypeSShort 8
2521#define PropertyTagTypeFloat 11
2522#define PropertyTagTypeDouble 12
2548 if (vt2type[
i].
vt ==
vt)
return vt2type[
i].type;
2550 FIXME(
"not supported variant type %u\n",
vt);
2606 FIXME(
"not supported variant type %d\n",
value->vt);
2610 item->length = item_size;
2631 FIXME(
"Not implemented for type %d\n",
image->type);
2675 UINT prop_count, prop_size,
i;
2684 FIXME(
"Not implemented for type %d\n",
image->type);
2709 hr = IWICMetadataReader_GetCount(
reader, &prop_count);
2712 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
2715 IWICEnumMetadataItem_Reset(enumerator);
2719 PropVariantInit(&
id);
2720 PropVariantInit(&
value);
2722 for (
i = 0;
i < prop_count;
i++)
2724 ULONG items_returned;
2727 hr = IWICEnumMetadataItem_Next(enumerator, 1,
NULL, &
id, &
value, &items_returned);
2731 if (item_size) prop_size +=
sizeof(
PropertyItem) + item_size;
2737 IWICEnumMetadataItem_Release(enumerator);
2741 *
count = prop_count;
2753 UINT prop_count, prop_size,
i;
2763 FIXME(
"Not implemented for type %d\n",
image->type);
2776 item_value = (
char *)(
buf + prop_count);
2778 for (
i = 0;
i < prop_count;
i++)
2780 buf[
i].value = item_value;
2781 item_value +=
buf[
i].length;
2790 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
2793 IWICEnumMetadataItem_Reset(enumerator);
2795 item_value = (
char *)(
buf + prop_count);
2797 PropVariantInit(&
id);
2798 PropVariantInit(&
value);
2800 for (
i = 0;
i < prop_count;
i++)
2803 ULONG items_returned;
2806 hr = IWICEnumMetadataItem_Next(enumerator, 1,
NULL, &
id, &
value, &items_returned);
2811 FIXME(
"not supported propvariant type for id: %u\n",
id.
vt);
2823 buf[
i].length = item_size;
2824 buf[
i].value = item_value;
2826 item_value += item_size;
2835 IWICEnumMetadataItem_Release(enumerator);
2850 {&ImageFormatGIF, &FrameDimensionTime},
2851 {&ImageFormatIcon, &FrameDimensionResolution},
2911 result = &FrameDimensionPage;
2953 UINT prop_size, prop_count;
2958 prop_size = prop_count = 0;
2960 if (!prop_item)
return;
2970 if (!prop_item)
return;
2973 memcpy(prop_item + prop_count + 1,
bitmap->prop_item + prop_count, prop_size);
2975 item_value = (
char *)(prop_item + prop_count + 1);
2977 for (
i = 0;
i < prop_count;
i++)
2979 prop_item[
i].
value = item_value;
2980 item_value += prop_item[
i].
length;
2984 prop_item[prop_count].
id =
item->id;
2987 prop_item[prop_count].
value = (
char *)(prop_item + prop_count + 1) + prop_size;
2991 bitmap->prop_item = prop_item;
3005 PropVariantInit(&
id);
3006 PropVariantInit(&
value);
3010 if (!
id.pwszVal)
return FALSE;
3032 PropVariantInit(&
id);
3033 PropVariantInit(&
value);
3037 if (!
id.pwszVal)
return NULL;
3045 item_size +=
sizeof(*item);
3095 loop->length =
sizeof(
SHORT);
3096 loop->
value = loop + 1;
3149 IWICImagingFactory_Release(
factory);
3158 if (!pal)
return NULL;
3161 pal->
value = pal + 1;
3168 rgb[
i*3] = (colors[
i] >> 16) & 0xff;
3169 rgb[
i*3 + 1] = (colors[
i] >> 8) & 0xff;
3170 rgb[
i*3 + 2] = colors[
i] & 0xff;
3197 UINT block_count,
i;
3200 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&block_reader);
3203 hr = IWICMetadataBlockReader_GetCount(block_reader, &block_count);
3206 for (
i = 0;
i < block_count;
i++)
3208 hr = IWICMetadataBlockReader_GetReaderByIndex(block_reader,
i, &
reader);
3221 IWICMetadataReader_Release(
reader);
3225 IWICMetadataBlockReader_Release(block_reader);
3235 UINT frame_count, block_count,
i;
3239 IWICBitmapDecoder_GetFrameCount(
decoder, &frame_count);
3240 delay =
calloc(1,
sizeof(*delay) + frame_count *
sizeof(
LONG));
3244 LONG frame_delay = 0;
3249 delay->
value = delay + 1;
3253 for (
i = 0;
i < frame_count;
i++)
3255 hr = IWICBitmapDecoder_GetFrame(
decoder,
i, &frame);
3259 IWICBitmapFrameDecode_Release(frame);
3265 hr = IWICBitmapDecoder_QueryInterface(
decoder, &IID_IWICMetadataBlockReader, (
void **)&block_reader);
3268 hr = IWICMetadataBlockReader_GetCount(block_reader, &block_count);
3271 for (
i = 0;
i < block_count;
i++)
3273 hr = IWICMetadataBlockReader_GetReaderByIndex(block_reader,
i, &
reader);
3288 IWICMetadataReader_Release(
reader);
3292 IWICMetadataBlockReader_Release(block_reader);
3302 loop->length =
sizeof(
SHORT);
3303 loop->
value = loop + 1;
3304 *(
SHORT *)loop->value = 1;
3321 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
3324 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&block_reader);
3327 hr = IWICMetadataBlockReader_GetCount(block_reader, &block_count);
3330 for (
i = 0;
i < block_count;
i++)
3332 hr = IWICMetadataBlockReader_GetReaderByIndex(block_reader,
i, &
reader);
3335 if (!transparent_idx)
3338 IWICMetadataReader_Release(
reader);
3342 IWICMetadataBlockReader_Release(block_reader);
3346 free(transparent_idx);
3348 IWICBitmapFrameDecode_Release(frame);
3358 item_size +=
sizeof(*item);
3385 ERR(
"unhandled case %u\n",
value.vt);
3399 static const struct keyword_info {
3412 if (*seen_text ==
NULL)
3414 if (*seen_text ==
NULL)
3430 (*seen_text)[
i] =
TRUE;
3457 rational[0] = 100000;
3479 rational[1] = 100000;
3481 rational[3] = 100000;
3502 rational[1] = 100000;
3504 rational[3] = 100000;
3506 rational[5] = 100000;
3508 rational[7] = 100000;
3510 rational[9] = 100000;
3512 rational[11] = 100000;
3527 for (
i = 0;
i < 6;
i++)
3533 datetime[0] =
value.uiVal;
3535 datetime[
i] =
value.bVal;
3551 item->length = item_size;
3553 snprintf(
item->value, item_size,
"%04u:%02u:%02u %02u:%02u:%02u",
3554 datetime[0], datetime[1], datetime[2], datetime[3], datetime[4], datetime[5]);
3588 hr = IWICBitmapFrameDecode_GetResolution(frame, &dpiX, &dpiY);
3593 unitX =
calloc(1,
sizeof(*unitX) + 4);
3594 unitY =
calloc(1,
sizeof(*unitY) + 4);
3596 if (!
unit || !unitX || !unitY)
3615 unitX->
value = unitX + 1;
3623 unitY->
value = unitY + 1;
3636 UINT block_count,
i;
3640 hr = IWICBitmapDecoder_GetFrame(
decoder, active_frame, &frame);
3644 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&block_reader);
3647 IWICBitmapFrameDecode_Release(frame);
3651 hr = IWICMetadataBlockReader_GetCount(block_reader, &block_count);
3654 IWICMetadataBlockReader_Release(block_reader);
3655 IWICBitmapFrameDecode_Release(frame);
3659 for (
i = 0;
i < block_count;
i++)
3664 hr = IWICMetadataBlockReader_GetReaderByIndex(block_reader,
i, &
reader);
3671 IWICMetadataReader_Release(
reader);
3687 if (!seen_whitepoint)
3708 if (!seen_histogram)
3715 IWICMetadataReader_Release(
reader);
3721 IWICMetadataBlockReader_Release(block_reader);
3723 IWICBitmapFrameDecode_Release(frame);
3736 IWICImagingFactory_Release(
factory);
3742 IWICBitmapDecoder_Release(*
decoder);
3770 IWICBitmapDecoder_GetFrameCount(
decoder, &frame_count);
3771 hr = IWICBitmapDecoder_GetFrame(
decoder, active_frame, &frame);
3774 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
wic_format);
3778 if (!force_conversion)
3785 IWICBitmapSource_AddRef(
source);
3840 hr = IWICBitmapSource_GetResolution(
source, &dpix, &dpiy);
3843 bitmap->image.xres = dpix;
3844 bitmap->image.yres = dpiy;
3850 IWICBitmapSource_Release(
source);
3856 if (metadata_reader)
3858 else if (IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&block_reader) ==
S_OK)
3860 UINT block_count = 0;
3861 if (IWICMetadataBlockReader_GetCount(block_reader, &block_count) ==
S_OK && block_count)
3862 IWICMetadataBlockReader_GetReaderByIndex(block_reader, 0, &
bitmap->metadata_reader);
3863 IWICMetadataBlockReader_Release(block_reader);
3868 IWICBitmapFrameDecode_Release(frame);
3884 bitmap->image.frame_count = frame_count;
3885 bitmap->image.current_frame = active_frame;
3887 IWICBitmapDecoder_AddRef(
decoder);
3896 bitmap->image.palette->Flags = 0;
3915 IWICBitmapDecoder_Release(
decoder);
3921 size_t obj_size, body_offset;
3935 ERR(
"unknown image type: %d\n",
image->type);
3946 memcpy((
char *)
image + body_offset, (
char *)new_image + body_offset, obj_size - body_offset);
3947 new_image->
type = ~0;
3955 LONG frame_left = 0, frame_top = 0;
3961 return IWICBitmapFrameDecode_GetSize(frame,
width,
height);
3984 IWICBitmapSource_Release(
source);
3995 if(first_frame || *
src>>24 != 0)
4005 BYTE bgcolor_idx = 0;
4017 if(
bitmap->prop_item[
i].length/3 > bgcolor_idx) {
4025 FIXME(
"can't get gif background color\n");
4039 if(active_frame >
image->current_frame) {
4040 hr = IWICBitmapDecoder_GetFrame(
bitmap->image.decoder,
image->current_frame, &frame);
4045 IWICBitmapFrameDecode_Release(frame);
4048 cur_frame =
image->current_frame;
4050 cur_frame =
image->current_frame+1;
4053 while(cur_frame != active_frame) {
4054 hr = IWICBitmapDecoder_GetFrame(
bitmap->image.decoder, cur_frame, &frame);
4082 IWICBitmapFrameDecode_Release(frame);
4086 hr = IWICBitmapDecoder_GetFrame(
bitmap->image.decoder, active_frame, &frame);
4091 IWICBitmapFrameDecode_Release(frame);
4095 image->current_frame = active_frame;
4138 ULONG bytesread, chunk_size;
4140 hr = IStream_Seek(pIStream,
seek, STREAM_SEEK_SET, &chunk_start);
4143 hr = IStream_Read(pIStream,
header, 8, &bytesread);
4144 if (
FAILED(
hr) || bytesread < 8)
break;
4153 seek.QuadPart = chunk_start.
QuadPart + chunk_size + 12;
4156 TRACE(
"has_tRNS = %d\n", has_tRNS);
4173 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
4176 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
4180 force_conversion =
TRUE;
4187 force_conversion =
TRUE;
4194 IWICBitmapFrameDecode_Release(frame);
4199 IWICBitmapDecoder_Release(
decoder);
4214 hr = IWICBitmapDecoder_GetFrameCount(
decoder, &frame_count);
4219 IWICBitmapDecoder_Release(
decoder);
4223 if(frame_count > 1) {
4224 free((*image)->palette);
4225 (*image)->palette =
NULL;
4268 is_placeable =
TRUE;
4271 seek.QuadPart = is_placeable ?
sizeof(pfh) : 0;
4309 TRACE(
"Could not load metafile\n");
4371 TRACE(
"Could not load metafile\n");
4432 bytesread >=
codecs[
i].info.SigSize)
4434 for (sig=0; sig<
codecs[
i].info.SigCount; sig++)
4450 TRACE(
"no match for %lu byte signature %x %x %x %x %x %x %x %x\n", bytesread,
4482 if (!
image || !dimensionID)
4487 if (frame >=
image->frame_count)
4488 WARN(
"requested frame %u, but image has only %u\n", frame,
image->frame_count);
4493 WARN(
"invalid image type %d\n",
image->type);
4498 if (
image->current_frame == frame)
4504 if (!
image->decoder)
4506 TRACE(
"image doesn't have an associated decoder\n");
4515 WARN(
"can't find decoder info\n");
4577 FIXME(
"not implemented\n");
4588 TRACE(
"(%p,%p:%#lx,%u,%lu,%p)\n",
image,
item,
item->id,
item->
type,
item->length,
item->value);
4591 FIXME(
"not implemented\n");
4638 IWICImagingFactory_Release(
factory);
4648 IWICBitmapEncoder_Release(
image->encoder);
4657 if (!
image->encoder)
4662 IWICBitmapEncoder_Release(
image->encoder);
4674 GUID container_format;
4697 hr = IWICBitmapEncoder_CreateNewFrame(
encoder, &frameencode, &encoderoptions);
4701 hr = IWICBitmapEncoder_GetContainerFormat(
encoder, &container_format);
4705 PROPBAG2 filter_option = { .pstrName = (
LPOLESTR)
L"FilterOption" };
4710 hr = IPropertyBag2_Write(encoderoptions, 1, &filter_option, &filter_value);
4714 hr = IWICBitmapFrameEncode_Initialize(frameencode, encoderoptions);
4717 hr = IWICBitmapFrameEncode_SetSize(frameencode,
width,
height);
4720 hr = IWICBitmapFrameEncode_SetResolution(frameencode,
image->xres,
image->yres);
4729 gdipformat =
bitmap->format;
4735 desired_wicformat = &GUID_WICPixelFormat32bppBGRA;
4739 memcpy(&wicformat, desired_wicformat,
sizeof(
GUID));
4740 hr = IWICBitmapFrameEncode_SetPixelFormat(frameencode, &wicformat);
4779 hr = IWICBitmapFrameEncode_WritePixels(frameencode, 1, row_size, row_size,
row);
4791 hr = IWICBitmapFrameEncode_Commit(frameencode);
4793 IWICBitmapFrameEncode_Release(frameencode);
4794 IPropertyBag2_Release(encoderoptions);
4802 int param_idx, value_idx;
4807 for (param_idx = 0; param_idx <
params->Count; param_idx++)
4813 for (value_idx = 0; value_idx <
param.NumberOfValues; value_idx++)
4815 if (value_array[value_idx] ==
val)
4841 status = terminate_status;
4893 encode_image =
NULL;
4897 encode_image =
codecs[
i].encode_func;
4899 if (encode_image ==
NULL)
4936 if (!
image->encoder)
4963 TRACE(
"<-- InsufficientBuffer\n");
4998 image->palette = new_palette;
5031static const BYTE gif_sig_mask[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
5071 { 0x557cf400, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5072 { 0xb96b3cabU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5091 { 0x557cf401, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5092 { 0xb96b3caeU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5111 { 0x557cf402, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5112 { 0xb96b3cb0U, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5131 { 0x557cf405, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5132 { 0xb96b3cb1U, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5151 { 0x557cf403, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5152 { 0xb96b3cacU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5171 { 0x557cf404, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5172 { 0xb96b3cadU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5191 { 0x557cf406, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5192 { 0xb96b3cafU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5211 { 0x557cf407, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } },
5212 { 0xb96b3cabU, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e} },
5236 int decoder_count=0;
5240 if (!numDecoders || !
size)
5249 *numDecoders = decoder_count;
5260 int i, decoder_count=0;
5261 TRACE(
"%u %u %p\n", numDecoders,
size, decoders);
5287 int encoder_count=0;
5291 if (!numEncoders || !
size)
5300 *numEncoders = encoder_count;
5311 int i, encoder_count=0;
5312 TRACE(
"%u %u %p\n", numEncoders,
size, encoders);
5341 FIXME(
"not implemented\n");
5356 memset(&bmh, 0,
sizeof(bmh));
5476 int i, num_palette_entries;
5479 if (!num_palette_entries)
5488 palette->Count = num_palette_entries;
5490 for (
i=0;
i<num_palette_entries;
i++)
5587 TRACE(
"(%p)\n", effect);
5606 if (!effect || !
size)
5609 switch (effect->
type)
5664 FIXME(
"not implemented\n");
5691 FIXME(
"TestControlForceBilinear not handled\n");
5695 FIXME(
"TestControlNoICM not handled\n");
5721 UINT srcwidth, srcheight;
5723 TRACE(
"(%p %u %u %p %p %p)\n",
5726 if (!
image || !ret_image)
5768 int bpp, bytesperpixel;
5769 BOOL rotate_90, flip_x, flip_y;
5770 int src_x_offset, src_y_offset;
5784 flip_x = (
type&6) == 2 || (
type&6) == 4;
5785 flip_y = (
type&3) == 1 || (
type&3) == 2;
5789 FIXME(
"Not implemented for type %i\n",
image->type);
5799 FIXME(
"Not implemented for %i bit images\n",
bpp);
5815 bytesperpixel =
bpp/8;
5825 LPBYTE src_row, src_pixel;
5826 LPBYTE dst_row, dst_pixel;
5828 src_origin =
bitmap->bits;
5829 if (flip_x) src_origin += bytesperpixel * (
bitmap->
width - 1);
5834 if (flip_y) src_x_offset = -
bitmap->stride;
5835 else src_x_offset =
bitmap->stride;
5836 if (flip_x) src_y_offset = -bytesperpixel;
5837 else src_y_offset = bytesperpixel;
5841 if (flip_x) src_x_offset = -bytesperpixel;
5842 else src_x_offset = bytesperpixel;
5843 if (flip_y) src_y_offset = -
bitmap->stride;
5844 else src_y_offset =
bitmap->stride;
5847 src_row = src_origin;
5848 dst_row = dst_lock.
Scan0;
5851 src_pixel = src_row;
5852 dst_pixel = dst_row;
5856 memcpy(dst_pixel, src_pixel, bytesperpixel);
5857 dst_pixel += bytesperpixel;
5858 src_pixel += src_x_offset;
5860 src_row += src_y_offset;
5861 dst_row += dst_lock.
Stride;
5885 FIXME(
"Abort callback is not supported.\n");
5896 FIXME(
"(%p, 0x%08x, %d, %d, %p, %f): stub\n",
bitmap,
format, dithertype, palettetype,
palette, alphathreshold);
5902 ch0[
color >> 24 ]++;
5903 ch1[(
color >> 16) & 0xff]++;
5904 ch2[(
color >> 8) & 0xff]++;
5905 ch3[
color & 0xff]++;
5913 ch1[(((
color >> 16) & 0xff) *
alpha) / 0xff]++;
5914 ch2[(((
color >> 8) & 0xff) *
alpha) / 0xff]++;
5920 ch0[(
color >> 16) & 0xff]++;
5921 ch1[(
color >> 8) & 0xff]++;
5922 ch2[
color & 0xff]++;
5927 ch0[(76 * ((
color >> 16) & 0xff) + 150 * ((
color >> 8) & 0xff) + 29 * (
color & 0xff)) / 0xff]++;
5932 ch0[
color & 0xff]++;
5937 ch0[(
color >> 8) & 0xff]++;
5942 ch0[(
color >> 16) & 0xff]++;
5947 ch0[(
color >> 24) & 0xff]++;
5969 TRACE(
"(%p, %d, %u, %p, %p, %p, %p)\n",
bitmap,
format, num_of_entries,
5970 ch0, ch1, ch2, ch3);
5972 if (!
bitmap || num_of_entries != 256)
5980 if (!ch0 || !ch1 || !ch2 || !ch3)
5982 memset(ch0, 0, num_of_entries *
sizeof(
UINT));
5983 memset(ch1, 0, num_of_entries *
sizeof(
UINT));
5984 memset(ch2, 0, num_of_entries *
sizeof(
UINT));
5985 memset(ch3, 0, num_of_entries *
sizeof(
UINT));
5988 if (!ch0 || !ch1 || !ch2 || ch3)
5990 memset(ch0, 0, num_of_entries *
sizeof(
UINT));
5991 memset(ch1, 0, num_of_entries *
sizeof(
UINT));
5992 memset(ch2, 0, num_of_entries *
sizeof(
UINT));
5999 if (!ch0 || ch1 || ch2 || ch3)
6001 memset(ch0, 0, num_of_entries *
sizeof(
UINT));
6004 WARN(
"Invalid histogram format requested, %d\n",
format);
6017 set_histogram_point[
format](
color, ch0, ch1, ch2, ch3);
6030 if (!num_of_entries)
6033 *num_of_entries = 256;
6059 hr = IWICImagingFactory_CreatePalette(
factory, &wic_palette);
6065 hr = IWICImagingFactory_CreateBitmapFromMemory(
factory,
data.Width,
data.Height,
6073 IWICPalette_GetColorCount(wic_palette, &
palette->Count);
6077 IWICBitmap_Release(
bitmap);
6080 IWICPalette_Release(wic_palette);
6083 IWICImagingFactory_Release(
factory);
6138 FIXME(
"unknown palette type %d\n",
type);
COMPILER_DEPENDENT_UINT64 UINT64
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_init(struct list_entry *head)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
#define ERROR_INVALID_PARAMETER
GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR *filename, UINT access, IStream **stream)
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, INT dstx, INT dsty, INT dstwidth, INT dstheight, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x, REAL y)
static const WCHAR emf_codecname[]
static GpStatus load_wmf(IStream *stream, GpMetafile **metafile)
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
static PropertyItem * create_prop(PROPID propid, PROPVARIANT *value)
static PropertyItem * get_gif_comment(IWICMetadataReader *reader)
static HRESULT png_read_chromaticity(IWICMetadataReader *reader, GpBitmap *bitmap)
static const BYTE bmp_sig_mask[]
GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count)
static void setpixel_16bppARGB1555(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static const BYTE wmf_sig_pattern[]
GpStatus encode_image_png(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
static const BYTE tiff_sig_mask[]
GpStatus WINGDIPAPI GdipDeleteEffect(CGpEffect *effect)
GpStatus WINGDIPAPI GdipSaveAddImage(GpImage *image, GpImage *additional_image, GDIPCONST EncoderParameters *params)
GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *image, REAL *res)
static GpStatus decode_image_wmf(IStream *stream, GpImage **image)
static void setpixel_48bppRGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static HRESULT png_read_whitepoint(IWICMetadataReader *reader, GpBitmap *bitmap)
GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size)
GpStatus WINGDIPAPI GdipGetImageEncodersSize(UINT *numEncoders, UINT *size)
static void setpixel_32bppPARGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static const WCHAR tiff_format[]
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
GpStatus WINGDIPAPI GdipBitmapConvertFormat(GpBitmap *bitmap, PixelFormat format, DitherType dithertype, PaletteType palettetype, ColorPalette *palette, REAL alphathreshold)
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream *stream, GDIPCONST CLSID *clsid, GDIPCONST EncoderParameters *params)
static GpStatus decode_image_icon(IStream *stream, GpImage **image)
static void set_histogram_point_g(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
static DWORD blend_argb_no_bkgnd_alpha(DWORD src, DWORD bkgnd)
GpStatus WINGDIPAPI GdipBitmapGetHistogramSize(HistogramFormat format, UINT *num_of_entries)
GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT x, INT y, INT width, INT height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size, UINT count, PropertyItem *buf)
static const WCHAR bmp_extension[]
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
GpStatus terminate_encoder_wic(GpImage *image)
static const WCHAR wmf_mimetype[]
GpStatus WINGDIPAPI GdipGetEffectParameterSize(CGpEffect *effect, UINT *size)
GpStatus WINGDIPAPI GdipGetImageItemData(GpImage *image, ImageItemData *item)
static void set_histogram_point_rgb(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
static void set_histogram_point_argb(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
static HRESULT png_read_gamma(IWICMetadataReader *reader, GpBitmap *bitmap)
static GpStatus decode_image_jpeg(IStream *stream, GpImage **image)
static GpStatus decode_image_png(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage *image, REAL *width, REAL *height)
GpStatus(* decode_image_func)(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
static void getpixel_16bppARGB1555(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipGetImageDecodersSize(UINT *numDecoders, UINT *size)
static GpStatus decode_image_emf(IStream *stream, GpImage **image)
static void getpixel_64bppPARGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
#define PropertyTagTypeSShort
static void generate_halftone_palette(ARGB *entries, UINT count)
static void getpixel_16bppRGB565(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static const WCHAR png_mimetype[]
static GpStatus load_emf(IStream *stream, GpMetafile **metafile)
static void getpixel_4bppIndexed(BYTE *index, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette)
static const WCHAR jpeg_mimetype[]
GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance, GDIPCONST WCHAR *lpBitmapName, GpBitmap **bitmap)
static HRESULT get_gif_frame_rect(IWICBitmapFrameDecode *frame, UINT *left, UINT *top, UINT *width, UINT *height)
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID *dimensionID, UINT *count)
static void setpixel_16bppRGB555(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static void get_gif_frame_property(IWICBitmapFrameDecode *frame, const GUID *format, const WCHAR *property, LONG *value)
static const WCHAR bmp_format[]
#define PropertyTagTypeFloat
static DWORD get_gif_background_color(GpBitmap *bitmap)
static const BYTE ico_sig_pattern[]
GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap *bitmap, GpGraphics *graphics, GpCachedBitmap **cachedbmp)
GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage *image, GDIPCONST PropertyItem *item)
GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage *image, PROPID propId)
static void add_property(GpBitmap *bitmap, PropertyItem *item)
static void set_histogram_point_pargb(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
static void setpixel_64bppPARGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static GpStatus encode_image_tiff(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
void(* metadata_reader_func)(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UINT frame)
static void set_histogram_point_a(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
static const WCHAR wmf_format[]
static HRESULT set_palette(IWICBitmapFrameEncode *frame, ColorPalette *palette)
#define convert_rgb_to_indexed(getpixel_function, setpixel_function)
#define PropertyTagTypeDouble
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR *filename, GDIPCONST CLSID *clsidEncoder, GDIPCONST EncoderParameters *encoderParams)
static void setpixel_32bppRGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipBitmapGetHistogram(GpBitmap *bitmap, HistogramFormat format, UINT num_of_entries, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, UINT *count)
static GpStatus encode_image_gif(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
static void getpixel_1bppIndexed(BYTE *index, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT width, INT height, GpGraphics *target, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap *bitmap, REAL xdpi, REAL ydpi)
static const WCHAR bmp_mimetype[]
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO *info, VOID *bits, GpBitmap **bitmap)
static const WCHAR tiff_mimetype[]
static GpStatus get_decoder_info(IStream *stream, const struct image_codec **result)
static GpStatus free_image_data(GpImage *image)
static void getpixel_32bppRGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static const BYTE emf_sig_pattern[]
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap *bitmap, GDIPCONST GpRect *rect, UINT flags, PixelFormat format, BitmapData *lockeddata)
static const BYTE jpeg_sig_mask[]
GpStatus convert_pixels(INT width, INT height, INT dst_stride, BYTE *dst_bits, PixelFormat dst_format, ColorPalette *dst_palette, INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *src_palette)
static void getpixel_8bppIndexed(BYTE *index, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipDeleteCachedBitmap(GpCachedBitmap *cachedbmp)
GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage *image, UINT *num)
GpStatus WINGDIPAPI GdipBitmapApplyEffect(GpBitmap *bitmap, CGpEffect *effect, RECT *roi, BOOL useAuxData, VOID **auxData, INT *auxDataSize)
GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(GpImage *image, GDIPCONST CLSID *clsidEncoder, UINT *size)
static const BYTE png_sig_pattern[]
static const WCHAR jpeg_format[]
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
#define convert_indexed_to_rgb(getpixel_function, setpixel_function)
static void getpixel_64bppARGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage *image, PixelFormat *format)
static const WCHAR gif_format[]
static GpStatus encode_image_BMP(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR *filename, GpImage **image)
static void getpixel_48bppRGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static const BYTE gif_sig_mask[]
static HRESULT png_read_time(IWICMetadataReader *reader, GpBitmap *bitmap)
static GpStatus decode_image_bmp(IStream *stream, GpImage **image)
static void setpixel_16bppGrayScale(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage *image, UINT width, UINT height, GpImage **ret_image, GetThumbnailImageAbort cb, VOID *cb_data)
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap *bitmap, INT x, INT y, ARGB *color)
static void move_bitmap(GpBitmap *dst, GpBitmap *src, BOOL clobber_palette)
static const WCHAR emf_mimetype[]
const WICPixelFormatGUID * wic_format
GpStatus(* encode_image_func)(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap *bitmap, INT x, INT y, ARGB color)
#define PropertyTagTypeSByte
static GpStatus decode_image_gif(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap *bitmap, HICON *hicon)
GpStatus WINGDIPAPI GdipSetEffectParameters(CGpEffect *effect, const VOID *params, const UINT size)
GpStatus WINGDIPAPI GdipDrawCachedBitmap(GpGraphics *graphics, GpCachedBitmap *cachedbmp, INT x, INT y)
static void getpixel_16bppGrayScale(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static const struct @407 pixel_formats[]
static void setpixel_64bppARGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipImageSetAbort(GpImage *image, GdiplusAbort *pabort)
static UINT propvariant_size(PROPVARIANT *value)
static const WCHAR gif_extension[]
GpStatus(* select_image_func)(GpImage *image, UINT active_frame)
static GpStatus encode_frame_wic(IWICBitmapEncoder *encoder, GpImage *image)
WICBitmapPaletteType palette_type
static const BYTE png_sig_mask[]
static void getpixel_24bppRGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static GpStatus select_frame_gif(GpImage *image, UINT active_frame)
static PropertyItem * get_gif_transparent_idx(IWICMetadataReader *reader)
static void png_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UINT active_frame)
static const WCHAR ico_format[]
static PropertyItem * get_gif_background(IWICMetadataReader *reader)
static GpStatus create_optimal_palette(ColorPalette *palette, INT desired, BOOL transparent, GpBitmap *bitmap)
GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size)
static void setpixel_4bppIndexed(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x, ColorPalette *palette)
static const WCHAR ico_extension[]
GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage *image, GDIPCONST GUID *dimensionID, UINT frame)
static BOOL has_png_transparency_chunk(IStream *pIStream)
GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage *image, UINT num, PROPID *list)
static const WCHAR tiff_extension[]
static GpStatus encode_image_jpeg(GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params)
#define convert_rgb_to_rgb(getpixel_function, setpixel_function)
#define convert_indexed_to_indexed(getpixel_function, setpixel_function)
static PixelFormat get_16bpp_format(HBITMAP hbm)
static const WCHAR png_codecname[]
static const WCHAR jpeg_codecname[]
static void setpixel_32bppARGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)
static const struct image_format_dimension image_format_dimensions[]
GpStatus WINGDIPAPI GdipFindFirstImageItem(GpImage *image, ImageItemData *item)
static HRESULT png_read_text(IWICMetadataReader *reader, GpBitmap *bitmap, BOOL **seen_text)
GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream *stream, GpImage **image)
static const WCHAR emf_extension[]
static const WCHAR wmf_extension[]
static ColorPalette * get_palette(IWICBitmapFrameDecode *frame, WICBitmapPaletteType palette_type)
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream *stream, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipInitializePalette(ColorPalette *palette, PaletteType type, INT desired, BOOL transparent, GpBitmap *bitmap)
static GpStatus initialize_decoder_wic(IStream *stream, REFGUID container, IWICBitmapDecoder **decoder)
static void setpixel_16bppRGB565(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static const WCHAR bmp_codecname[]
static const WCHAR tiff_codecname[]
static GpStatus get_screen_resolution(REAL *xres, REAL *yres)
static void getpixel_16bppRGB555(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static BOOL get_bool_property(IWICMetadataReader *reader, const GUID *guid, const WCHAR *prop_name)
static void setpixel_1bppIndexed(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x, ColorPalette *palette)
GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType type)
GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
GpStatus WINGDIPAPI GdipGetImageEncoders(UINT numEncoders, UINT size, ImageCodecInfo *encoders)
GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage *image, PROPID propid, UINT size, PropertyItem *buffer)
static ULONG get_ulong_by_index(IWICMetadataReader *reader, ULONG index)
GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR *filename, GpImage **image)
GpStatus WINGDIPAPI GdipGetImageDecoders(UINT numDecoders, UINT size, ImageCodecInfo *decoders)
GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap *bitmap, HBITMAP *hbmReturn, ARGB background)
GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum control, void *param)
static const WCHAR png_format[]
static GpStatus select_frame_wic(GpImage *image, UINT active_frame)
static void getpixel_32bppARGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
static const struct image_codec codecs[NUM_CODECS]
static const BYTE wmf_sig_mask[]
static void set_histogram_point_r(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
static const BYTE jpeg_sig_pattern[]
static PropertyItem * get_gif_loopcount(IWICMetadataReader *reader)
GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap **bitmap)
static void set_histogram_point_gray(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
static const WCHAR png_extension[]
GpStatus WINGDIPAPI GdipImageForceValidation(GpImage *image)
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory **)
static unsigned int absdiff(unsigned int x, unsigned int y)
static const BYTE bmp_sig_pattern[]
static void setpixel_8bppIndexed(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x, ColorPalette *palette)
static const BYTE tiff_sig_pattern[]
static const BYTE ico_sig_mask[]
GpStatus WINGDIPAPI GdipCreateEffect(const GUID guid, CGpEffect **effect)
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *res)
GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage *image, PROPID propid, UINT *size)
static void set_histogram_point_b(ARGB color, UINT *ch0, UINT *ch1, UINT *ch2, UINT *ch3)
GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream *stream, GpBitmap **bitmap)
static GpStatus decode_image_tiff(IStream *stream, GpImage **image)
static PropertyItem * get_gif_palette(IWICBitmapDecoder *decoder, IWICMetadataReader *reader)
static GpStatus decode_image_wic(IStream *stream, REFGUID container, metadata_reader_func metadata_reader, GpImage **image)
static GpStatus get_decoder_info_from_image(GpImage *image, const struct image_codec **result)
static UINT vt_to_itemtype(UINT vt)
static HRESULT png_read_histogram(IWICMetadataReader *reader, GpBitmap *bitmap)
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage *image, GUID *dimensionIDs, UINT count)
static const WCHAR gif_mimetype[]
GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap *bitmap, BitmapData *lockeddata)
#define WMF_PLACEABLE_KEY
static GpStatus decode_frame_wic(IWICBitmapDecoder *decoder, BOOL force_conversion, UINT active_frame, metadata_reader_func metadata_reader, GpImage **image)
static const WCHAR ico_mimetype[]
static const BYTE gif_sig_pattern[12]
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBitmap **bitmap)
static GpStatus initialize_encoder_wic(IStream *stream, REFGUID container, GpImage *image)
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipSaveAdd(GpImage *image, GDIPCONST EncoderParameters *params)
static const WCHAR jpeg_extension[]
static BOOL has_encoder_param_long(GDIPCONST EncoderParameters *params, GUID param_guid, ULONG val)
static GpStatus encode_image_wic(GpImage *image, IStream *stream, REFGUID container, GDIPCONST EncoderParameters *params)
static void setpixel_24bppRGB(BYTE r, BYTE g, BYTE b, BYTE a, BYTE *row, UINT x)
static UINT get_palette_index(BYTE r, BYTE g, BYTE b, BYTE a, ColorPalette *palette)
static HRESULT png_add_unit_properties(IWICBitmapFrameDecode *frame, GpBitmap *bitmap)
static const WCHAR wmf_codecname[]
GpStatus WINGDIPAPI GdipBitmapCreateApplyEffect(GpBitmap **inputBitmaps, INT numInputs, CGpEffect *effect, RECT *roi, RECT *outputRect, GpBitmap **outputBitmap, BOOL useAuxData, VOID **auxData, INT *auxDataSize)
static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UINT active_frame)
static const WCHAR ico_codecname[]
static HRESULT blit_gif_frame(GpBitmap *bitmap, IWICBitmapFrameDecode *frame, BOOL first_frame)
static GpStatus propvariant_to_item(PROPVARIANT *value, PropertyItem *item, UINT size, PROPID id)
static PropertyItem * get_property(IWICMetadataReader *reader, const GUID *guid, const WCHAR *prop_name)
static const WCHAR emf_format[]
static void getpixel_32bppPARGB(BYTE *r, BYTE *g, BYTE *b, BYTE *a, const BYTE *row, UINT x)
static const WCHAR gif_codecname[]
static const BYTE emf_sig_mask[]
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GpStatus hresult_to_status(HRESULT res)
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride)
REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi, BOOL printer_display)
#define GIF_DISPOSE_RESTORE_TO_PREV
static BOOL image_lock(GpImage *image)
#define PIXELFORMATBPP(x)
GpStatus METAFILE_GetGraphicsContext(GpMetafile *metafile, GpGraphics **result)
#define GIF_DISPOSE_DO_NOT_DISPOSE
static INT gdip_round(REAL x)
#define GIF_DISPOSE_UNSPECIFIED
@ BrightnessContrastEffect
@ HueSaturationLightnessEffect
GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics)
static void image_unlock(GpImage *image)
void METAFILE_Free(GpMetafile *metafile)
#define GIF_DISPOSE_RESTORE_TO_BKGND
@ EncoderValueFrameDimensionPage
@ ImageFlagsHasRealPixelSize
@ ImageFlagsColorSpaceRGB
@ ImageFlagsColorSpaceGRAY
@ ImageCodecFlagsSupportBitmap
@ ImageCodecFlagsSupportVector
@ EncoderParameterValueTypeLong
@ TestControlForceBilinear
@ TestControlGetBuildNumber
#define PropertyTagIndexTransparent
#define PropertyTagFrameDelay
#define PropertyTagTypeShort
#define PropertyTagIndexBackground
@ ImageLockModeUserInputBuf
#define PropertyTagCopyright
#define PropertyTagTypeLong
#define PropertyTagGlobalPalette
#define PropertyTagImageTitle
#define PropertyTagPrimaryChromaticities
#define PropertyTagWhitePoint
#define PropertyTagTypeUndefined
#define PropertyTagImageDescription
#define PropertyTagPixelUnit
#define PropertyTagTypeSLONG
#define PropertyTagTypeRational
#define PropertyTagPaletteHistogram
#define PropertyTagTypeByte
#define PropertyTagPixelPerUnitX
#define PropertyTagEquipModel
#define PropertyTagDateTime
#define PropertyTagPixelPerUnitY
#define PropertyTagTypeSRational
#define PropertyTagArtist
#define PropertyTagLoopCount
#define PropertyTagSoftwareUsed
#define PropertyTagTypeASCII
#define PropertyTagExifUserComment
struct GdiplusAbort GdiplusAbort
ImageAbort GetThumbnailImageAbort
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean b
GLsizei GLsizei GLfloat distance
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
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
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
static const struct @438 keywords[]
void *WINAPI CoTaskMemAlloc(SIZE_T size)
#define memcpy(s1, s2, n)
#define comment(fmt, arg1)
static const char * dst_format
static const unsigned char metafile[]
static const CLSID IPropertyStorage UINT *static const PROPSPEC PROPVARIANT *static UINT const PROPSPEC PROPVARIANT PROPID
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
png_const_structrp png_const_inforp int * unit
static Real area(Real A[2], Real B[2], Real C[2])
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2)
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
#define offsetof(TYPE, MEMBER)
static __inline const char * wine_dbgstr_guid(const GUID *id)
int seek(void *fd, ulong off, int mode)
IWICBitmapEncoder * encoder
select_image_func select_func
decode_image_func decode_func
encode_image_func encode_func
BITMAPINFOHEADER bmiHeader
#define FIELD_OFFSET(t, f)
void WINAPI VariantInit(VARIANTARG *pVarg)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
@ WICBitmapEncoderNoCache
@ WICDecodeMetadataCacheOnLoad
@ WICBitmapPaletteTypeFixedHalftone256
@ WICBitmapPaletteTypeFixedGray256
@ WICBitmapPaletteTypeFixedBW
@ WICBitmapPaletteTypeFixedHalftone64
@ WICBitmapPaletteTypeFixedGray16
@ WICBitmapPaletteTypeFixedGray4
@ WICBitmapPaletteTypeFixedHalftone216
@ WICBitmapPaletteTypeFixedHalftone27
@ WICBitmapPaletteTypeFixedHalftone125
@ WICBitmapPaletteTypeFixedHalftone8
@ WICBitmapPaletteTypeFixedHalftone252
_In_ ULONG _In_ ULONG rgb
#define WINCODEC_ERR_PALETTEUNAVAILABLE
static const char appdata[]
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
HENHMETAFILE WINAPI CopyEnhMetaFileW(_In_ HENHMETAFILE hemfSrc, _In_opt_ LPCWSTR pszFile)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define ENHMETA_SIGNATURE
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)
BOOL WINAPI DeleteDC(_In_ HDC)
HICON WINAPI CreateIcon(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ BYTE, _In_ BYTE, _In_ const BYTE *, _In_ const BYTE *)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
#define LR_CREATEDIBSECTION
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)