ReactOS 0.4.15-dev-8146-gdc0ed6d
Image Class Reference

#include <gdiplusheaders.h>

Inheritance diagram for Image:
Collaboration diagram for Image:

Public Member Functions

 Image (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 
 Image (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
ImageClone ()
 
virtual ~Image ()
 
Status GetAllPropertyItems (UINT totalBufferSize, UINT numProperties, PropertyItem *allItems)
 
Status GetBounds (RectF *srcRect, Unit *srcUnit)
 
Status GetEncoderParameterList (const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer)
 
UINT GetEncoderParameterListSize (const CLSID *clsidEncoder)
 
UINT GetFlags ()
 
UINT GetFrameCount (const GUID *dimensionID)
 
UINT GetFrameDimensionsCount ()
 
Status GetFrameDimensionsList (GUID *dimensionIDs, UINT count)
 
UINT GetHeight ()
 
REAL GetHorizontalResolution ()
 
Status GetLastStatus ()
 
Status GetPalette (ColorPalette *palette, INT size)
 
INT GetPaletteSize ()
 
Status GetPhysicalDimension (SizeF *size)
 
PixelFormat GetPixelFormat ()
 
UINT GetPropertyCount ()
 
Status GetPropertyIdList (UINT numOfProperty, PROPID *list)
 
Status GetPropertyItem (PROPID propId, UINT propSize, PropertyItem *buffer)
 
UINT GetPropertyItemSize (PROPID propId)
 
Status GetPropertySize (UINT *totalBufferSize, UINT *numProperties)
 
Status GetRawFormat (GUID *format)
 
ImageGetThumbnailImage (UINT thumbWidth, UINT thumbHeight, GetThumbnailImageAbort callback, VOID *callbackData)
 
ImageType GetType ()
 
REAL GetVerticalResolution ()
 
UINT GetWidth ()
 
Status RemovePropertyItem (PROPID propId)
 
Status RotateFlip (RotateFlipType rotateFlipType)
 
Status Save (IStream *stream, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status Save (const WCHAR *filename, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status SaveAdd (const EncoderParameters *encoderParams)
 
Status SaveAdd (Image *newImage, const EncoderParameters *encoderParams)
 
Status SelectActiveFrame (const GUID *dimensionID, UINT frameIndex)
 
Status SetPalette (const ColorPalette *palette)
 
Status SetPropertyItem (const PropertyItem *item)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Static Public Member Functions

static ImageFromFile (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
static ImageFromStream (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 

Protected Member Functions

 Image ()
 
 Image (GpImage *image, Status status)
 
Status SetStatus (Status status) const
 
void SetNativeImage (GpImage *image)
 

Protected Attributes

GpImagenativeImage
 
Status lastStatus
 

Private Member Functions

 Image (const Image &)
 
Imageoperator= (const Image &)
 

Friends

class Graphics
 
class TextureBrush
 
GpImage *& getNat (const Image *image)
 

Detailed Description

Definition at line 22 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Image() [1/5]

Image::Image ( IStream stream,
BOOL  useEmbeddedColorManagement = FALSE 
)
inline

Definition at line 28 of file gdiplusheaders.h.

29 {
30 if (useEmbeddedColorManagement)
31 lastStatus = DllExports::GdipLoadImageFromStreamICM(stream, &nativeImage);
32 else
33 lastStatus = DllExports::GdipLoadImageFromStream(stream, &nativeImage);
34 }
Status lastStatus
GpImage * nativeImage
#define NULL
Definition: types.h:112
Definition: parse.h:23

◆ Image() [2/5]

Image::Image ( const WCHAR filename,
BOOL  useEmbeddedColorManagement = FALSE 
)
inline

Definition at line 36 of file gdiplusheaders.h.

37 {
38 if (useEmbeddedColorManagement)
39 lastStatus = DllExports::GdipLoadImageFromFileICM(filename, &nativeImage);
40 else
41 lastStatus = DllExports::GdipLoadImageFromFile(filename, &nativeImage);
42 }
const char * filename
Definition: ioapi.h:137

◆ ~Image()

virtual Image::~Image ( )
inlinevirtual

Definition at line 52 of file gdiplusheaders.h.

53 {
54 DllExports::GdipDisposeImage(nativeImage);
55 }

◆ Image() [3/5]

Image::Image ( )
inlineprotected

Definition at line 342 of file gdiplusheaders.h.

343 {
344 }

Referenced by Clone(), FromFile(), FromStream(), and GetThumbnailImage().

◆ Image() [4/5]

Image::Image ( GpImage image,
Status  status 
)
inlineprotected

Definition at line 346 of file gdiplusheaders.h.

347 {
348 }
Definition: ps.c:97

◆ Image() [5/5]

Image::Image ( const Image )
private

Member Function Documentation

◆ Clone()

Image * Image::Clone ( )
inline

Definition at line 45 of file gdiplusheaders.h.

46 {
47 GpImage *cloneimage = NULL;
48 SetStatus(DllExports::GdipCloneImage(nativeImage, &cloneimage));
49 return new Image(cloneimage, lastStatus);
50 }
Status SetStatus(Status status) const

Referenced by Bitmap::Clone().

◆ FromFile()

static Image * Image::FromFile ( const WCHAR filename,
BOOL  useEmbeddedColorManagement = FALSE 
)
inlinestatic

Definition at line 58 of file gdiplusheaders.h.

59 {
60 return new Image(filename, useEmbeddedColorManagement);
61 }

◆ FromStream()

static Image * Image::FromStream ( IStream stream,
BOOL  useEmbeddedColorManagement = FALSE 
)
inlinestatic

Definition at line 64 of file gdiplusheaders.h.

65 {
66 return new Image(stream, useEmbeddedColorManagement);
67 }

◆ GetAllPropertyItems()

Status Image::GetAllPropertyItems ( UINT  totalBufferSize,
UINT  numProperties,
PropertyItem allItems 
)
inline

Definition at line 70 of file gdiplusheaders.h.

71 {
72 if (allItems == NULL)
74 return SetStatus(DllExports::GdipGetAllPropertyItems(nativeImage, totalBufferSize, numProperties, allItems));
75 }
@ InvalidParameter
Definition: gdiplustypes.h:28

◆ GetBounds()

Status Image::GetBounds ( RectF srcRect,
Unit srcUnit 
)
inline

Definition at line 78 of file gdiplusheaders.h.

79 {
80 return SetStatus(DllExports::GdipGetImageBounds(nativeImage, srcRect, srcUnit));
81 }

◆ GetEncoderParameterList()

Status Image::GetEncoderParameterList ( const CLSID clsidEncoder,
UINT  size,
EncoderParameters buffer 
)
inline

Definition at line 84 of file gdiplusheaders.h.

85 {
86#if 1
88#else
89 return SetStatus(DllExports::GdipGetEncoderParameterList(nativeImage, clsidEncoder, size, buffer));
90#endif
91 }
@ NotImplemented
Definition: gdiplustypes.h:32
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915

◆ GetEncoderParameterListSize()

UINT Image::GetEncoderParameterListSize ( const CLSID clsidEncoder)
inline

Definition at line 94 of file gdiplusheaders.h.

95 {
96 UINT size = 0;
97 SetStatus(DllExports::GdipGetEncoderParameterListSize(nativeImage, clsidEncoder, &size));
98 return size;
99 }
unsigned int UINT
Definition: ndis.h:50

◆ GetFlags()

UINT Image::GetFlags ( )
inline

Definition at line 102 of file gdiplusheaders.h.

103 {
104 UINT flags = 0;
105 SetStatus(DllExports::GdipGetImageFlags(nativeImage, &flags));
106 return flags;
107 }
GLbitfield flags
Definition: glext.h:7161

◆ GetFrameCount()

UINT Image::GetFrameCount ( const GUID dimensionID)
inline

Definition at line 110 of file gdiplusheaders.h.

111 {
112 UINT count = 0;
113 SetStatus(DllExports::GdipImageGetFrameCount(nativeImage, dimensionID, &count));
114 return count;
115 }
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ GetFrameDimensionsCount()

UINT Image::GetFrameDimensionsCount ( )
inline

Definition at line 118 of file gdiplusheaders.h.

119 {
120 UINT count = 0;
121 SetStatus(DllExports::GdipImageGetFrameDimensionsCount(nativeImage, &count));
122 return count;
123 }

◆ GetFrameDimensionsList()

Status Image::GetFrameDimensionsList ( GUID dimensionIDs,
UINT  count 
)
inline

Definition at line 126 of file gdiplusheaders.h.

127 {
128 return SetStatus(DllExports::GdipImageGetFrameDimensionsList(nativeImage, dimensionIDs, count));
129 }

◆ GetHeight()

UINT Image::GetHeight ( )
inline

Definition at line 132 of file gdiplusheaders.h.

133 {
134 UINT height = 0;
135 SetStatus(DllExports::GdipGetImageHeight(nativeImage, &height));
136 return height;
137 }
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

◆ GetHorizontalResolution()

REAL Image::GetHorizontalResolution ( )
inline

Definition at line 140 of file gdiplusheaders.h.

141 {
142 REAL resolution = 0.0f;
143 SetStatus(DllExports::GdipGetImageHorizontalResolution(nativeImage, &resolution));
144 return resolution;
145 }
float REAL
Definition: types.h:41

◆ GetLastStatus()

Status Image::GetLastStatus ( )
inline

Definition at line 148 of file gdiplusheaders.h.

149 {
150 return lastStatus;
151 }

◆ GetPalette()

Status Image::GetPalette ( ColorPalette palette,
INT  size 
)
inline

Definition at line 154 of file gdiplusheaders.h.

155 {
156 return SetStatus(DllExports::GdipGetImagePalette(nativeImage, palette, size));
157 }
static HPALETTE palette
Definition: clipboard.c:1345

◆ GetPaletteSize()

INT Image::GetPaletteSize ( )
inline

Definition at line 160 of file gdiplusheaders.h.

161 {
162 INT size = 0;
163 SetStatus(DllExports::GdipGetImagePaletteSize(nativeImage, &size));
164 return size;
165 }
int32_t INT
Definition: typedefs.h:58

◆ GetPhysicalDimension()

Status Image::GetPhysicalDimension ( SizeF *  size)
inline

Definition at line 168 of file gdiplusheaders.h.

169 {
170 if (size == NULL)
172
173 return SetStatus(DllExports::GdipGetImageDimension(nativeImage, &size->Width, &size->Height));
174 }

◆ GetPixelFormat()

PixelFormat Image::GetPixelFormat ( )
inline

Definition at line 177 of file gdiplusheaders.h.

178 {
180 SetStatus(DllExports::GdipGetImagePixelFormat(nativeImage, &format));
181 return format;
182 }
INT PixelFormat
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546

◆ GetPropertyCount()

UINT Image::GetPropertyCount ( )
inline

Definition at line 185 of file gdiplusheaders.h.

186 {
187 UINT numOfProperty = 0;
188 SetStatus(DllExports::GdipGetPropertyCount(nativeImage, &numOfProperty));
189 return numOfProperty;
190 }

◆ GetPropertyIdList()

Status Image::GetPropertyIdList ( UINT  numOfProperty,
PROPID list 
)
inline

Definition at line 193 of file gdiplusheaders.h.

194 {
195 return SetStatus(DllExports::GdipGetPropertyIdList(nativeImage, numOfProperty, list));
196 }
Definition: list.h:37

◆ GetPropertyItem()

Status Image::GetPropertyItem ( PROPID  propId,
UINT  propSize,
PropertyItem buffer 
)
inline

Definition at line 199 of file gdiplusheaders.h.

200 {
201 return SetStatus(DllExports::GdipGetPropertyItem(nativeImage, propId, propSize, buffer));
202 }

◆ GetPropertyItemSize()

UINT Image::GetPropertyItemSize ( PROPID  propId)
inline

Definition at line 205 of file gdiplusheaders.h.

206 {
207 UINT size = 0;
208 SetStatus(DllExports::GdipGetPropertyItemSize(nativeImage, propId, &size));
209 return size;
210 }

◆ GetPropertySize()

Status Image::GetPropertySize ( UINT totalBufferSize,
UINT numProperties 
)
inline

Definition at line 213 of file gdiplusheaders.h.

214 {
215 return SetStatus(DllExports::GdipGetPropertySize(nativeImage, totalBufferSize, numProperties));
216 }

◆ GetRawFormat()

Status Image::GetRawFormat ( GUID format)
inline

Definition at line 219 of file gdiplusheaders.h.

220 {
221 return SetStatus(DllExports::GdipGetImageRawFormat(nativeImage, format));
222 }

◆ GetThumbnailImage()

Image * Image::GetThumbnailImage ( UINT  thumbWidth,
UINT  thumbHeight,
GetThumbnailImageAbort  callback,
VOID callbackData 
)
inline

Definition at line 225 of file gdiplusheaders.h.

226 {
227 GpImage *thumbImage = NULL;
228 SetStatus(DllExports::GdipGetImageThumbnail(
229 nativeImage, thumbWidth, thumbHeight, &thumbImage, callback, callbackData));
230 Image *newImage = new Image(thumbImage, lastStatus);
231 if (newImage == NULL)
232 {
233 DllExports::GdipDisposeImage(thumbImage);
234 }
235 return newImage;
236 }
static IPrintDialogCallback callback
Definition: printdlg.c:326

◆ GetType()

ImageType Image::GetType ( )
inline

Definition at line 239 of file gdiplusheaders.h.

240 {
242 SetStatus(DllExports::GdipGetImageType(nativeImage, &type));
243 return type;
244 }
ImageType
Definition: gdiplusenums.h:193
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ GetVerticalResolution()

REAL Image::GetVerticalResolution ( )
inline

Definition at line 247 of file gdiplusheaders.h.

248 {
249 REAL resolution = 0.0f;
250 SetStatus(DllExports::GdipGetImageVerticalResolution(nativeImage, &resolution));
251 return resolution;
252 }

◆ GetWidth()

UINT Image::GetWidth ( )
inline

Definition at line 255 of file gdiplusheaders.h.

256 {
257 UINT width = 0;
258 SetStatus(DllExports::GdipGetImageWidth(nativeImage, &width));
259 return width;
260 }
GLint GLint GLsizei width
Definition: gl.h:1546

◆ operator=()

Image & Image::operator= ( const Image )
private

◆ RemovePropertyItem()

Status Image::RemovePropertyItem ( PROPID  propId)
inline

Definition at line 263 of file gdiplusheaders.h.

264 {
265 return SetStatus(DllExports::GdipRemovePropertyItem(nativeImage, propId));
266 }

◆ RotateFlip()

Status Image::RotateFlip ( RotateFlipType  rotateFlipType)
inline

Definition at line 269 of file gdiplusheaders.h.

270 {
271 return SetStatus(DllExports::GdipImageRotateFlip(nativeImage, rotateFlipType));
272 }

◆ Save() [1/2]

Status Image::Save ( const WCHAR filename,
const CLSID clsidEncoder,
const EncoderParameters encoderParams 
)
inline

Definition at line 281 of file gdiplusheaders.h.

282 {
283 return SetStatus(DllExports::GdipSaveImageToFile(nativeImage, filename, clsidEncoder, encoderParams));
284 }

◆ Save() [2/2]

Status Image::Save ( IStream stream,
const CLSID clsidEncoder,
const EncoderParameters encoderParams 
)
inline

Definition at line 275 of file gdiplusheaders.h.

276 {
277 return SetStatus(DllExports::GdipSaveImageToStream(nativeImage, stream, clsidEncoder, encoderParams));
278 }

◆ SaveAdd() [1/2]

Status Image::SaveAdd ( const EncoderParameters encoderParams)
inline

Definition at line 287 of file gdiplusheaders.h.

288 {
289 return SetStatus(DllExports::GdipSaveAdd(nativeImage, encoderParams));
290 }

◆ SaveAdd() [2/2]

Status Image::SaveAdd ( Image newImage,
const EncoderParameters encoderParams 
)
inline

Definition at line 293 of file gdiplusheaders.h.

294 {
295#if 1
296 // FIXME: Not available yet
298#else
299 if (!newImage)
301
302 return SetStatus(DllExports::GdipSaveAddImage(nativeImage, getNat(newImage), encoderParams));
303#endif
304 }
friend GpImage *& getNat(const Image *image)

◆ SelectActiveFrame()

Status Image::SelectActiveFrame ( const GUID dimensionID,
UINT  frameIndex 
)
inline

Definition at line 307 of file gdiplusheaders.h.

308 {
309 return SetStatus(DllExports::GdipImageSelectActiveFrame(nativeImage, dimensionID, frameIndex));
310 }

◆ SetNativeImage()

void Image::SetNativeImage ( GpImage image)
inlineprotected

Definition at line 359 of file gdiplusheaders.h.

360 {
362 }
GLeglImageOES image
Definition: gl.h:2204

Referenced by Bitmap::Bitmap(), and Metafile::Metafile().

◆ SetPalette()

Status Image::SetPalette ( const ColorPalette palette)
inline

Definition at line 313 of file gdiplusheaders.h.

314 {
315 return SetStatus(DllExports::GdipSetImagePalette(nativeImage, palette));
316 }

◆ SetPropertyItem()

Status Image::SetPropertyItem ( const PropertyItem item)
inline

Definition at line 319 of file gdiplusheaders.h.

320 {
321 return SetStatus(DllExports::GdipSetPropertyItem(nativeImage, item));
322 }
static ATOM item
Definition: dde.c:856

◆ SetStatus()

Friends And Related Function Documentation

◆ getNat

GpImage *& getNat ( const Image image)
friend

Definition at line 372 of file gdiplusheaders.h.

373 {
374 return const_cast<Image *>(image)->nativeImage;
375 }

Referenced by Bitmap::Bitmap(), and SaveAdd().

◆ Graphics

friend class Graphics
friend

Definition at line 25 of file gdiplusheaders.h.

◆ TextureBrush

friend class TextureBrush
friend

Definition at line 26 of file gdiplusheaders.h.

Member Data Documentation

◆ lastStatus

Status Image::lastStatus
mutableprotected

◆ nativeImage


The documentation for this class was generated from the following file: