[10/10] gdiplus: Improve GdipGetImageRawFormat stub.
Hans Leidekker
hans at codeweavers.com
Mon Nov 24 03:23:16 CST 2008
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/gdiplusenums.h b/include/gdiplusenums.h
index 3138b8c..3bd3ce7 100644
--- a/include/gdiplusenums.h
+++ b/include/gdiplusenums.h
@@ -22,6 +22,18 @@
typedef UINT GraphicsState;
typedef UINT GraphicsContainer;
+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 Unit
{
UnitWorld = 0,
More information about the wine-patches
mailing list