ReactOS  0.4.14-dev-583-g2a1ba2c
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 (VOID)
 
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 (VOID)
 
UINT GetFrameCount (const GUID *dimensionID)
 
UINT GetFrameDimensionsCount (VOID)
 
Status GetFrameDimensionsList (GUID *dimensionIDs, UINT count)
 
UINT GetHeight (VOID)
 
REAL GetHorizontalResolution (VOID)
 
Status GetLastStatus (VOID)
 
Status GetPalette (ColorPalette *palette, INT size)
 
INT GetPaletteSize (VOID)
 
Status GetPhysicalDimension (SizeF *size)
 
PixelFormat GetPixelFormat (VOID)
 
UINT GetPropertyCount (VOID)
 
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 (VOID)
 
REAL GetVerticalResolution (VOID)
 
UINT GetWidth (VOID)
 
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 ()
 

Private Member Functions

Status SetStatus (Status status) const
 

Private Attributes

Status status
 
GpImageimage
 

Friends

class Graphics
 

Detailed Description

Definition at line 22 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Image() [1/3]

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

Definition at line 27 of file gdiplusheaders.h.

28  {
29  if (useEmbeddedColorManagement)
31  else
33  }
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream *stream, GpImage **image)
Definition: image.c:4392
GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream *stream, GpImage **image)
Definition: image.c:4357
Definition: parse.h:22
Definition: ps.c:97

◆ Image() [2/3]

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

Definition at line 35 of file gdiplusheaders.h.

36  {
37  if (useEmbeddedColorManagement)
39  else
41  }
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR *filename, GpImage **image)
Definition: image.c:2928
const char * filename
Definition: ioapi.h:135
GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR *filename, GpImage **image)
Definition: image.c:2954
Definition: ps.c:97

◆ Image() [3/3]

Image::Image ( )
inlineprotected

Definition at line 260 of file gdiplusheaders.h.

261  {
262  }

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

Member Function Documentation

◆ Clone()

Image* Image::Clone ( VOID  )
inline

Definition at line 43 of file gdiplusheaders.h.

44  {
45  Image *newImage = new Image();
46  SetStatus(DllExports::GdipCloneImage(image, newImage ? &newImage->image : NULL));
47  return newImage;
48  }
GpImage * image
GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
Definition: image.c:1308
smooth NULL
Definition: ftsmooth.c:416
Status SetStatus(Status status) const

◆ FromFile()

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

Definition at line 50 of file gdiplusheaders.h.

51  {
52  return new Image(filename, useEmbeddedColorManagement);
53  }
const char * filename
Definition: ioapi.h:135

◆ FromStream()

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

Definition at line 55 of file gdiplusheaders.h.

56  {
57  return new Image(stream, useEmbeddedColorManagement);
58  }
Definition: parse.h:22

◆ GetAllPropertyItems()

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

Definition at line 60 of file gdiplusheaders.h.

61  {
62  return SetStatus(DllExports::GdipGetAllPropertyItems(image, totalBufferSize, numProperties, allItems));
63  }
GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size, UINT count, PropertyItem *buf)
Definition: image.c:2757
Status SetStatus(Status status) const

◆ GetBounds()

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

Definition at line 65 of file gdiplusheaders.h.

66  {
67  return SetStatus(DllExports::GdipGetImageBounds(image, srcRect, srcUnit));
68  }
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
Definition: image.c:2148
Status SetStatus(Status status) const

◆ GetEncoderParameterList()

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

Definition at line 70 of file gdiplusheaders.h.

71  {
72  return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetEncoderParameterList(image, clsidEncoder, size, buffer));
73  }

◆ GetEncoderParameterListSize()

UINT Image::GetEncoderParameterListSize ( const CLSID clsidEncoder)
inline

Definition at line 75 of file gdiplusheaders.h.

76  {
77  return 0; // FIXME: not available:
78 // UINT size;
79 // SetStatus(DllExports::GdipGetEncoderParameterListSize(image, clsidEncoder, &size));
80 // return size;
81  }

◆ GetFlags()

UINT Image::GetFlags ( VOID  )
inline

Definition at line 83 of file gdiplusheaders.h.

84  {
85  UINT flags;
87  return flags;
88  }
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
Definition: image.c:5266
GLbitfield flags
Definition: glext.h:7161
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ GetFrameCount()

UINT Image::GetFrameCount ( const GUID dimensionID)
inline

Definition at line 90 of file gdiplusheaders.h.

91  {
92  UINT count;
94  return count;
95  }
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID *dimensionID, UINT *count)
Definition: image.c:2865
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ GetFrameDimensionsCount()

UINT Image::GetFrameDimensionsCount ( VOID  )
inline

Definition at line 97 of file gdiplusheaders.h.

98  {
99  UINT count;
101  return count;
102  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, UINT *count)
Definition: image.c:2885

◆ GetFrameDimensionsList()

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

Definition at line 104 of file gdiplusheaders.h.

105  {
107  }
GLuint GLuint GLsizei count
Definition: gl.h:1545
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage *image, GUID *dimensionIDs, UINT count)
Definition: image.c:2900

◆ GetHeight()

UINT Image::GetHeight ( VOID  )
inline

Definition at line 109 of file gdiplusheaders.h.

110  {
111  UINT height;
113  return height;
114  }
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
Definition: image.c:2239
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ GetHorizontalResolution()

REAL Image::GetHorizontalResolution ( VOID  )
inline

Definition at line 116 of file gdiplusheaders.h.

117  {
118  REAL resolution;
120  return resolution;
121  }
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *res)
Definition: image.c:2261
Status SetStatus(Status status) const
float REAL
Definition: types.h:41

◆ GetLastStatus()

Status Image::GetLastStatus ( VOID  )
inline

Definition at line 123 of file gdiplusheaders.h.

124  {
125  return status;
126  }
Status status

◆ GetPalette()

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

Definition at line 128 of file gdiplusheaders.h.

129  {
131  }
GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size)
Definition: image.c:4662
GLsizeiptr size
Definition: glext.h:5919
static HPALETTE palette
Definition: clipboard.c:1345
Status SetStatus(Status status) const

◆ GetPaletteSize()

INT Image::GetPaletteSize ( VOID  )
inline

Definition at line 133 of file gdiplusheaders.h.

134  {
135  INT size;
137  return size;
138  }
int32_t INT
Definition: typedefs.h:56
GLsizeiptr size
Definition: glext.h:5919
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size)
Definition: image.c:2273

◆ GetPhysicalDimension()

Status Image::GetPhysicalDimension ( SizeF *  size)
inline

Definition at line 140 of file gdiplusheaders.h.

141  {
142  return SetStatus(DllExports::GdipGetImageDimension(image, size ? &size->Width : NULL, size ? &size->Height : NULL));
143  }
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage *image, REAL *width, REAL *height)
Definition: image.c:2176

◆ GetPixelFormat()

PixelFormat Image::GetPixelFormat ( VOID  )
inline

Definition at line 145 of file gdiplusheaders.h.

146  {
149  return format;
150  }
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage *image, PixelFormat *format)
Definition: image.c:2291
INT PixelFormat
Status SetStatus(Status status) const

◆ GetPropertyCount()

UINT Image::GetPropertyCount ( VOID  )
inline

Definition at line 152 of file gdiplusheaders.h.

153  {
154  UINT numOfProperty;
156  return numOfProperty;
157  }
GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage *image, UINT *num)
Definition: image.c:2364
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ GetPropertyIdList()

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

Definition at line 159 of file gdiplusheaders.h.

160  {
161  return SetStatus(DllExports::GdipGetPropertyIdList(image, numOfProperty, list));
162  }
GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage *image, UINT num, PROPID *list)
Definition: image.c:2387
Definition: _list.h:228
Status SetStatus(Status status) const

◆ GetPropertyItem()

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

Definition at line 164 of file gdiplusheaders.h.

165  {
166  return SetStatus(DllExports::GdipGetPropertyItem(image, propId, propSize, buffer));
167  }
GLuint buffer
Definition: glext.h:5915
GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage *image, PROPID propid, UINT size, PropertyItem *buffer)
Definition: image.c:2634
Status SetStatus(Status status) const

◆ GetPropertyItemSize()

UINT Image::GetPropertyItemSize ( PROPID  propId)
inline

Definition at line 169 of file gdiplusheaders.h.

170  {
171  UINT size;
173  return size;
174  }
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage *image, PROPID propid, UINT *size)
Definition: image.c:2488
GLsizeiptr size
Definition: glext.h:5919
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ GetPropertySize()

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

Definition at line 176 of file gdiplusheaders.h.

177  {
178  return SetStatus(DllExports::GdipGetPropertySize(image, totalBufferSize, numProperties));
179  }
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count)
Definition: image.c:2687

◆ GetRawFormat()

Status Image::GetRawFormat ( GUID format)
inline

Definition at line 181 of file gdiplusheaders.h.

182  {
184  }
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
Definition: image.c:2306
Status SetStatus(Status status) const

◆ GetThumbnailImage()

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

Definition at line 186 of file gdiplusheaders.h.

187  {
188  Image *thumbImage = new Image();
189  SetStatus(DllExports::GdipGetImageThumbnail(image, thumbWidth, thumbHeight, thumbImage ? &thumbImage->image : NULL, callback, callbackData));
190  return thumbImage;
191  }
GpImage * image
smooth NULL
Definition: ftsmooth.c:416
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage *image, UINT width, UINT height, GpImage **ret_image, GetThumbnailImageAbort cb, VOID *cb_data)
Definition: image.c:5309
Status SetStatus(Status status) const

◆ GetType()

ImageType Image::GetType ( VOID  )
inline

Definition at line 193 of file gdiplusheaders.h.

194  {
195  ImageType type;
197  return type;
198  }
GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)
Definition: image.c:2318
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Status SetStatus(Status status) const
ImageType
Definition: gdiplusenums.h:191

◆ GetVerticalResolution()

REAL Image::GetVerticalResolution ( VOID  )
inline

Definition at line 200 of file gdiplusheaders.h.

201  {
202  REAL resolution;
204  return resolution;
205  }
GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *image, REAL *res)
Definition: image.c:2330
Status SetStatus(Status status) const
float REAL
Definition: types.h:41

◆ GetWidth()

UINT Image::GetWidth ( VOID  )
inline

Definition at line 207 of file gdiplusheaders.h.

208  {
209  UINT width;
211  return width;
212  }
GLint GLint GLsizei width
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
Definition: image.c:2342
Status SetStatus(Status status) const
unsigned int UINT
Definition: ndis.h:50

◆ RemovePropertyItem()

Status Image::RemovePropertyItem ( PROPID  propId)
inline

Definition at line 214 of file gdiplusheaders.h.

215  {
217  }
GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage *image, PROPID propId)
Definition: image.c:4399
Status SetStatus(Status status) const

◆ RotateFlip()

Status Image::RotateFlip ( RotateFlipType  rotateFlipType)
inline

Definition at line 219 of file gdiplusheaders.h.

220  {
221  return SetStatus(DllExports::GdipImageRotateFlip(image, rotateFlipType));
222  }
GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType type)
Definition: image.c:5358
Status SetStatus(Status status) const

◆ Save() [1/2]

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

Definition at line 224 of file gdiplusheaders.h.

225  {
226  return SetStatus(DllExports::GdipSaveImageToStream(image, stream, clsidEncoder, encoderParams));
227  }
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream *stream, GDIPCONST CLSID *clsid, GDIPCONST EncoderParameters *params)
Definition: image.c:4623
Definition: parse.h:22
Status SetStatus(Status status) const

◆ Save() [2/2]

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

Definition at line 229 of file gdiplusheaders.h.

230  {
231  return SetStatus(DllExports::GdipSaveImageToFile(image, filename, clsidEncoder, encoderParams));
232  }
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR *filename, GDIPCONST CLSID *clsidEncoder, GDIPCONST EncoderParameters *encoderParams)
Definition: image.c:4428
const char * filename
Definition: ioapi.h:135
Status SetStatus(Status status) const

◆ SaveAdd() [1/2]

Status Image::SaveAdd ( const EncoderParameters encoderParams)
inline

Definition at line 234 of file gdiplusheaders.h.

235  {
236  return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAdd(image, encoderParams));
237  }

◆ SaveAdd() [2/2]

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

Definition at line 239 of file gdiplusheaders.h.

240  {
241  return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipSaveAddImage(image, newImage ? newImage->image : NULL, encoderParams));
242  }

◆ SelectActiveFrame()

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

Definition at line 244 of file gdiplusheaders.h.

245  {
246  return SetStatus(DllExports::GdipImageSelectActiveFrame(image, dimensionID, frameIndex));
247  }
GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage *image, GDIPCONST GUID *dimensionID, UINT frame)
Definition: image.c:4302
Status SetStatus(Status status) const

◆ SetPalette()

Status Image::SetPalette ( const ColorPalette palette)
inline

Definition at line 249 of file gdiplusheaders.h.

250  {
252  }
static HPALETTE palette
Definition: clipboard.c:1345
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette)
Definition: image.c:4696

◆ SetPropertyItem()

Status Image::SetPropertyItem ( const PropertyItem item)
inline

Definition at line 254 of file gdiplusheaders.h.

255  {
257  }
GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage *image, GDIPCONST PropertyItem *item)
Definition: image.c:4414
static ATOM item
Definition: dde.c:856
Status SetStatus(Status status) const

◆ SetStatus()

Friends And Related Function Documentation

◆ Graphics

friend class Graphics
friend

Definition at line 25 of file gdiplusheaders.h.

Member Data Documentation

◆ image

GpImage* Image::image
private

Definition at line 266 of file gdiplusheaders.h.

Referenced by Clone(), and GetThumbnailImage().

◆ status

Status Image::status
mutableprivate

Definition at line 265 of file gdiplusheaders.h.

Referenced by GetLastStatus(), and SetStatus().


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