gdiplus: Improve GdipGetImageRawFormat stub.

This commit is contained in:
Hans Leidekker 2008-11-24 10:23:16 +01:00 committed by Alexandre Julliard
parent 6122c77b9d
commit 8b15fa4b2a
2 changed files with 24 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "olectl.h"
#include "ole2.h"
#include "initguid.h"
#include "gdiplus.h"
#include "gdiplus_private.h"
#include "wine/debug.h"
@ -785,9 +786,18 @@ GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
return InvalidParameter;
if(!(calls++))
FIXME("not implemented\n");
FIXME("stub\n");
return NotImplemented;
/* FIXME: should be detected from embedded picture or stored separately */
switch (image->type)
{
case ImageTypeBitmap: *format = ImageFormatBMP; break;
case ImageTypeMetafile: *format = ImageFormatEMF; break;
default:
WARN("unknown type %u\n", image->type);
*format = ImageFormatUndefined;
}
return Ok;
}
GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)

View File

@ -19,6 +19,18 @@
#ifndef _GDIPLUSIMAGING_H
#define _GDIPLUSIMAGING_H
DEFINE_GUID(ImageFormatUndefined, 0xb96b3ca9, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatMemoryBMP, 0xb96b3caa, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatBMP, 0xb96b3cab, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatEMF, 0xb96b3cac, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatWMF, 0xb96b3cad, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatJPEG, 0xb96b3cae, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatPNG, 0xb96b3caf, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatGIF, 0xb96b3cb0, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatTIFF, 0xb96b3cb1, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatEXIF, 0xb96b3cb2, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
DEFINE_GUID(ImageFormatIcon, 0xb96b3cb5, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
enum ImageLockMode
{
ImageLockModeRead = 1,