Hans Leidekker : gdiplus: Improve GdipGetImageRawFormat stub.
Alexandre Julliard
julliard at winehq.org
Mon Nov 24 09:16:59 CST 2008
Module: wine
Branch: master
Commit: 8b15fa4b2a964394d79d439c4fdc87c5f543bb63
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8b15fa4b2a964394d79d439c4fdc87c5f543bb63
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Nov 24 10:23:16 2008 +0100
gdiplus: Improve GdipGetImageRawFormat stub.
---
dlls/gdiplus/image.c | 14 ++++++++++++--
include/gdiplusimaging.h | 12 ++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 277c86c..e44315a 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -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)
diff --git a/include/gdiplusimaging.h b/include/gdiplusimaging.h
index 791d9cd..e8dda73 100644
--- a/include/gdiplusimaging.h
+++ b/include/gdiplusimaging.h
@@ -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,
More information about the wine-cvs
mailing list