gdiplus: Changed GdipGetImageType.
[wine/testsucceed.git] / dlls / gdiplus / image.c
blobc37898124df7bf2a4223a078f54f2d3463ba3ca9
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
21 #include "windef.h"
22 #include "winbase.h"
23 #include "wingdi.h"
25 #define COBJMACROS
26 #include "objbase.h"
28 #include "gdiplus.h"
29 #include "gdiplus_private.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
34 GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
36 if(!image)
37 return InvalidParameter;
39 IPicture_Release(image->picture);
40 GdipFree(image);
42 return Ok;
45 GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect,
46 GpUnit *srcUnit)
48 if(!image || !srcRect || !srcUnit)
49 return InvalidParameter;
50 if(image->type == ImageTypeMetafile){
51 memcpy(srcRect, &((GpMetafile*)image)->bounds, sizeof(GpRectF));
52 *srcUnit = ((GpMetafile*)image)->unit;
54 else{
55 FIXME("not implemented for bitmaps\n");
56 return NotImplemented;
59 return Ok;
62 GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
64 static int calls;
66 if(!image || !height)
67 return InvalidParameter;
69 if(!(calls++))
70 FIXME("not implemented\n");
72 return NotImplemented;
75 GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *res)
77 static int calls;
79 if(!image || !res)
80 return InvalidParameter;
82 if(!(calls++))
83 FIXME("not implemented\n");
85 return NotImplemented;
88 GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
90 static int calls;
92 if(!image || !format)
93 return InvalidParameter;
95 if(!(calls++))
96 FIXME("not implemented\n");
98 return NotImplemented;
101 GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)
103 if(!image || !type)
104 return InvalidParameter;
106 *type = image->type;
108 return Ok;
111 GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *image, REAL *res)
113 static int calls;
115 if(!image || !res)
116 return InvalidParameter;
118 if(!(calls++))
119 FIXME("not implemented\n");
121 return NotImplemented;
124 GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
126 static int calls;
128 if(!image || !width)
129 return InvalidParameter;
131 if(!(calls++))
132 FIXME("not implemented\n");
134 return NotImplemented;
137 GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
138 GDIPCONST GUID* dimensionID, UINT* count)
140 static int calls;
142 if(!image || !dimensionID || !count)
143 return InvalidParameter;
145 if(!(calls++))
146 FIXME("not implemented\n");
148 return NotImplemented;
151 GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream* stream, GpImage **image)
153 static int calls;
155 if(!stream || !image)
156 return InvalidParameter;
158 if(!(calls++))
159 FIXME("not implemented\n");
161 return NotImplemented;