Note to Esme: - in GdipGetPropertyIdList, for the call to IWICEnumMetadataItem_Next(), MSDN states that the last parameter (items_returned) is optional. - Wine's implementation doesn't support optional parameter here. - I leave it to you if of any importance.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/gdiplus/image.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 59e3d038c4d..280a2c77da8 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -95,7 +95,7 @@ static ColorPalette *get_palette(IWICBitmapFrameDecode *frame, WICBitmapPaletteT
IWICPalette_GetColorCount(wic_palette, &count); palette = heap_alloc(2 * sizeof(UINT) + count * sizeof(ARGB)); - IWICPalette_GetColors(wic_palette, count, palette->Entries, &palette->Count); + IWICPalette_GetColors(wic_palette, count, (UINT *)palette->Entries, &palette->Count);
IWICPalette_GetType(wic_palette, &type); switch(type) { @@ -140,7 +140,7 @@ static HRESULT set_palette(IWICBitmapFrameEncode *frame, ColorPalette *palette) IWICImagingFactory_Release(factory); if (SUCCEEDED(hr)) { - hr = IWICPalette_InitializeCustom(wic_palette, palette->Entries, palette->Count); + hr = IWICPalette_InitializeCustom(wic_palette, (UINT *)palette->Entries, palette->Count);
if (SUCCEEDED(hr)) hr = IWICBitmapFrameEncode_SetPalette(frame, wic_palette); @@ -2437,7 +2437,8 @@ GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage *image, UINT num, PROPID *list HRESULT hr; IWICMetadataReader *reader; IWICEnumMetadataItem *enumerator; - UINT prop_count, i, items_returned; + UINT prop_count, i; + ULONG items_returned;
TRACE("(%p, %u, %p)\n", image, num, list);
@@ -2781,7 +2782,8 @@ GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count)
for (i = 0; i < prop_count; i++) { - UINT items_returned, item_size; + ULONG items_returned; + UINT item_size;
hr = IWICEnumMetadataItem_Next(enumerator, 1, NULL, &id, &value, &items_returned); if (hr != S_OK) break; @@ -2859,7 +2861,8 @@ GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size, for (i = 0; i < prop_count; i++) { PropertyItem *item; - UINT items_returned, item_size; + ULONG items_returned; + UINT item_size;
hr = IWICEnumMetadataItem_Next(enumerator, 1, NULL, &id, &value, &items_returned); if (hr != S_OK) break; @@ -4114,7 +4117,7 @@ static GpStatus load_wmf(IStream *stream, GpMetafile **metafile) METAHEADER mh; HMETAFILE hmf; HRESULT hr; - UINT size; + ULONG size; void *buf;
hr = IStream_Read(stream, &key, sizeof(key), &size); @@ -4192,7 +4195,7 @@ static GpStatus load_emf(IStream *stream, GpMetafile **metafile) HENHMETAFILE hemf; GpStatus status; HRESULT hr; - UINT size; + ULONG size; void *buf;
hr = IStream_Read(stream, &emh, sizeof(emh), &size); @@ -4281,7 +4284,7 @@ static GpStatus get_decoder_info(IStream* stream, const struct image_codec **res const BYTE *pattern, *mask; LARGE_INTEGER seek; HRESULT hr; - UINT bytesread; + ULONG bytesread; int i; DWORD j, sig;
@@ -5839,7 +5842,7 @@ static GpStatus create_optimal_palette(ColorPalette *palette, INT desired, { palette->Flags = 0; IWICPalette_GetColorCount(wic_palette, &palette->Count); - IWICPalette_GetColors(wic_palette, palette->Count, palette->Entries, &palette->Count); + IWICPalette_GetColors(wic_palette, palette->Count, (UINT *)palette->Entries, &palette->Count); }
IWICBitmap_Release(bitmap);