Commit 9615dd8f authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Implement GdipGetImagePalette.

parent 59f45f2c
...@@ -2242,15 +2242,22 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream, ...@@ -2242,15 +2242,22 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
*/ */
GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size) GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size)
{ {
static int calls = 0; TRACE("(%p,%p,%i)\n", image, palette, size);
if(!image) if (!image || !palette)
return InvalidParameter; return InvalidParameter;
if(!(calls++)) if (size < (sizeof(UINT)*2+sizeof(ARGB)*image->palette_count))
FIXME("not implemented\n"); {
TRACE("<-- InsufficientBuffer\n");
return InsufficientBuffer;
}
return NotImplemented; palette->Flags = image->palette_flags;
palette->Count = image->palette_count;
memcpy(palette->Entries, image->palette_entries, sizeof(ARGB)*image->palette_count);
return Ok;
} }
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment