Home COM GDI+ WebBrowser Data Access 

Image Functions (GDI+)

 

 

The Image functions allow loading and saving raster images (bitmaps) and vector images (metafiles). An Image object encapsulates a bitmap or a metafile and stores attributes that you can retrieve by calling various Get functions. You can construct Image objects from a variety of file types including BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF.

 

Return Values

If the function succeeds, it returns Ok, which is an element of the Status enumeration.

 

If the function fails, it returns one of the other elements of the Status enumeration.

 

GdipCloneImage

 

Description

Creates a new Image object and initializes it with the contents of this Image object.

Syntax

GpStatus WINGDIPAPI GdipCloneImage(

    GpImage *image,

    GpImage **cloneImage

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCloneImage ( _

    BYVAL pImage AS DWORD, _

    BYREF cloneImage AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

cloneImage

[in] Pointer to a variab le that receives a pointer to the new Image object.

 

GdipConvertToEmfPlus

 

Syntax

GpStatus WINGDIPAPI GdipConvertToEmfPlus(

    const GpGraphics* refGraphics,

    GpMetafile* metafile,

    BOOL* conversionSuccess,

    EmfType emfType,

    const WCHAR* description,

    GpMetafile** out_metafile

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipConvertToEmfPlusToFile

 

Syntax

GpStatus WINGDIPAPI GdipConvertToEmfPlusToFile(

    const GpGraphics* refGraphics,

    GpMetafile* metafile,

    BOOL* conversionSuccess,

    const WCHAR* filename,

    EmfType emfType,

    const WCHAR* description,

    GpMetafile** out_metafile

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipConvertToEmfPlusToStream

 

Syntax

GpStatus WINGDIPAPI GdipConvertToEmfPlusToStream(

    const GpGraphics* refGraphics,

    GpMetafile* metafile,

    BOOL* conversionSuccess,

    IStream* stream,

    EmfType emfType,

    const WCHAR* description,

    GpMetafile** out_metafile

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipDisposeImage

 

Description

Disposes the specified Image object.

Syntax

GpStatus WINGDIPAPI GdipDisposeImage(

    GpImage *image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipDisposeImage ( _

    BYVAL pImage AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object to dispose.

 

GdipFindFirstImageItem

 

Syntax

GpStatus WINGDIPAPI GdipFindFirstImageItem(

    GpImage *image,

    ImageItemData* item

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipFindNExtImageItem

 

Syntax

GpStatus WINGDIPAPI GdipFindNextImageItem(

    GpImage *image,

    ImageItemData* item

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipGetAllPropertyItems

 

Description

Disposes the specified Image object.

Syntax

GpStatus WINGDIPAPI GdipGetAllPropertyItems(

    GpImage *image,

    UINT totalBufferSize,

    UINT numProperties,

    PropertyItem* allItems

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetAllPropertyItems ( _

    BYVAL pImage AS DWORD, _

    BYVAL totalBufferSize AS DWORD, _

    BYVAL numProperties AS DWORD, _

    BYREF allItems AS PropertyItem _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

totalBufferSize

[in] Long integer value that specifies the size, in bytes, of the allItems buffer. Call the GdipGetPropertySize method to obtain the required size.

numProperties

[in] Long integer value that specifies the number of properties in the image. Call the GdipGetPropertySize method to obtain this number.

allItems

[out] Pointer to an array of PropertyItem structures that receive the property items.

 

GdipEncoderParameterList

 

Description

Gets a list of the parameters supported by a specified image encoder.

Syntax

GpStatus WINGDIPAPI GdipGetEncoderParameterList(

    GpImage *image,

    GDIPCONST CLSID* clsidEncoder,

    UINT size,

    EncoderParameters* buffer

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetEncoderParameterList ( _

    BYVAL pImage AS DWORD, _

    BYREF clsidEncoder AS GUID, _

    BYVAL psize AS DWORD, _

    BYREF buffer AS EncoderParameters _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

clsidEncoder

[in] Pointer to a CLSID that specifies the encoder.

size

[in] Integer that specifies the size, in bytes, of the buffer array. Call the GdipGetEncoderParameterListSize method to obtain the required size.

buffer

[out] Pointer to an EncoderParameters structure that receives the list of supported parameters.

 

GdipGetEncoderParameterListSize

 

Description

Gets the size, in bytes, of the parameter list for a specified image encoder.

Syntax

GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(

    GpImage *image,

    GDIPCONST CLSID* clsidEncoder,

    UINT* size

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetEncoderParameterListSize ( _

    BYVAL pImage AS DWORD, _

    BYREF clsidEncoder AS GUID, _

    BYREF psize AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

clsidEncoder

[in] Pointer to a CLSID that specifies the encoder.

size

[in] Pointer to a variable that receives the size, in bytes, of the parameter list.

 

GdipGetImageBounds

 

Description

Gets the bounding rectangle for this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageBounds(

    GpImage *image,

    GpRectF *srcRect,

    GpUnit *srcUnit

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageBounds ( _

    BYVAL pImage AS DWORD, _

    BYREF srcRect AS RectF, _

    BYREF srcUnit AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

srcRect

[out] Pointer to a RectF object that receives the bounding rectangle.

srcUnit

[out] Pointer to a variable that receives an element of the Unit enumeration that indicates the unit of measure for the bounding rectangle.

 

GdipGetImageDimension

 

Description

Gets the width and height of this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageDimension(

    GpImage *image,

    REAL *width,

    REAL *height

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageDimension ( _

    BYVAL pImage AS DWORD, _

    BYREF nWidth AS SINGLE, _

    BYREF nHeight AS SINGLE _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

width

[out] Pointer to a variable thatr eceives the width of this image.

height

[out] Pointer to a variable that receives the height of this image.

 

GdipGetImageFlags

 

Description

Gets a set of flags that indicate certain attributes of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImageFlags(

    GpImage *image,

    UINT *flags

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageFlags ( _

    BYVAL pImage AS DWORD, _

    BYREF flags AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

flags

[out] Pointer to a variable that receives a value that holds a set of single-bit flags. The flags are defined in the ImageFlags enumeration.

 

GdipGetImageGraphicsContext

 

Description

Creates a Graphics object that is associated with an Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImageGraphicsContext(

    GpImage *image,

    GpGraphics **graphics

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageGraphicsContext ( _

    BYVAL pImage AS DWORD, _

    BYREF graphics AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to an Image object that will be associated with the new Graphics object.

graphics

[out] Pointer to a vafriable that receives a pointer to the new Graphics object.

 

GdipGetImageHeight

 

Description

Gets the image height, in pixels, of this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageHeight(

    GpImage *image,

    UINT *height

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageHeight ( _

    BYVAL pImage AS DWORD, _

    BYREF nHeight AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

height

[out] Pointer to a variable that receives the height, in pixels, of this image.

 

GdipGetImageHorizontalResolution

 

Description

Gets the horizontal resolution, in dots per inch, of this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(

    GpImage *image,

    REAL *resolution

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageHorizontalResolution ( _

    BYVAL pImage AS DWORD, _

    BYREF resolution AS SINGLE _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

resolution

[out] Pointer to a variable that receives the horizontal resolution, in dots per inch, of this image.

 

GdipGetImageItemData

 

Syntax

GpStatus WINGDIPAPI GdipGetImageItemData(

    GpImage *image,

    ImageItemData* item

);

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipGetImagePalette

 

Description

Gets the color palette of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImagePalette(

    GpImage *image,

    ColorPalette *palette,

    INT size

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImagePalette ( _

    BYVAL pImage AS DWORD, _

    BYREF palette AS ColorPalette, _

    BYVAL psize AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

palette

[out] Pointer to a ColorPalette structure that receives the palette.

size

[in] Long integer value that specifies the size, in bytes, of the palette. Call the GdipGetPaletteSize method to determine the size.

 

GdipGetImagePaletteSize

 

Description

Gets the size, in bytes, of the color palette of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImagePaletteSize(

    GpImage *image,

    INT *size

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImagePaletteSize ( _

    BYVAL pImage AS DWORD, _

    BYREF psize AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

size

[out] Pointer to a variable that receives the size, in bytes, of the color palette of this Image object.

 

GdipGetImagePixelFormat

 

Description

Gets the pixel format of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImagePixelFormat(

    GpImage *image,

    PixelFormat *format

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImagePixelFormat ( _

    BYVAL pImage AS DWORD, _

    BYREF pFormat AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

size

[in] Poingter to a variable thatg receives the size, in bytes, of the color palette of this Image object.

 

GdipGetImageRawFormat

 

Description

Gets a globally unique identifier (GUID) that identifies the format of the image.

Syntax

GpStatus WINGDIPAPI GdipGetImageRawFormat(

    GpImage *image,

    GUID *format

)

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageRawFormat ( _

    BYVAL pImage AS DWORD, _

    BYREF pFormat AS GUID _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

format

[out] Pointer to a GUID variable that receives the format identifier.

 

GdipGetImageThumbnail

 

Description

Gets a thumbnail image from this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImageThumbnail(

    GpImage *image,

    UINT thumbWidth,

    UINT thumbHeight,

    GpImage **thumbImage,

    GetThumbnailImageAbort callback,

    VOID * callbackData

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageThumbnail ( _

    BYVAL pImage AS DWORD, _

    BYVAL thumbWidth AS DWORD, _

    BYVAL thumbHeight AS DWORD, _

    BYREF thumbImage AS DWORD, _

    BYVAL pcallback AS DWORD, _

    BYVAL callbackData AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

thumbWidth

[in] Width, in pixels, of the requested thumbnail image.

thumbHeight

[in] Height, in pixels, of the requested thumbnail image.

thumbImage

[out] Pointer to an Image object that contains the thumbnail image.

callback

[in] Callback function that you provide. During the process of creating or retrieving the thumbnail image, Microsoft Windows GDI+ calls this function to give you the opportunity to abort the process. The default value is NULL.

callbackData

[in] Pointer to a block of memory that contains data to be used by the callback function. The default value is NULL.

 

GdipGetImageType

 

Description

Gets the type (bitmap or metafile) of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetImageType(

    GpImage *image,

    ImageType *type

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageType ( _

    BYVAL pImage AS DWORD, _

    BYREF pType AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

type

[out] Pointer to a variable that receives an element of the ImageType enumeration that indicates the image type.

 

GdipGetImageVerticalResolution

 

Description

Gets the vertical resolution, in dots per inch, of this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageVerticalResolution(

    GpImage *image,

    REAL *resolution

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageVerticalResolution ( _

    BYVAL pImage AS DWORD, _

    BYREF resolution AS SINGLE _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

resolution

[out] Pointer to a variable thatg receives the vertical resolution, in dots per inch, of this image.

 

GdipGetImageWidth

 

Description

Gets the width, in pixels, of this image.

Syntax

GpStatus WINGDIPAPI GdipGetImageWidth(

    GpImage *image,

    UINT *width

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetImageWidth ( _

    BYVAL pImage AS DWORD, _

    BYREF nWidth AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

width

[out] Pointer to a variable that receives the width, in pixels, of this image.

 

GdipGetPropertyCount

 

Description

Gets the number of properties (pieces of metadata) stored in this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetPropertyCount(

    GpImage *image,

    UINT* numOfProperty

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPropertyCount ( _

    BYVAL pImage AS DWORD, _

    BYREF numOfProperty AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

numOfProperty

[out] Pointer to a variable that receives the number of properties stored in this Image object.

 

GdipGetPropertyIdList

 

Description

Gets a list of the property identifiers used in the metadata of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetPropertyIdList(

    GpImage *image,

    UINT numOfProperty,

    PROPID* list

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPropertyIdList ( _

    BYVAL pImage AS DWORD, _

    BYVAL numOfProperty AS DWORD, _

    BYREF list AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

numOfProperty

[in] Integer that specifies the number of elements in the list array. Call the GetPropertyCount method to determine this number.

list

[out] Pointer to an array that receives the property identifiers.

 

GdipGetPropertyItem

 

Description

Gets a specified property item (piece of metadata) from this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetPropertyItem(

    GpImage *image,

    PROPID propId,

    UINT propSize,

    PropertyItem* buffer

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPropertyItem ( _

    BYVAL pImage AS DWORD, _

    BYVAL propId AS DWORD, _

    BYVAL propSize AS DWORD, _

    BYREF buffer AS PropertyItem _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

propId

[in] Integer that identifies the property item to be retrieved.

propSize

[in] Integer that specifies the size, in bytes, of the property item to be retrieved. Call the GdipGetPropertyItemSize method to determine the size.

buffer

[out] Pointer to a PropertyItem structure that receives the property item.

 

GdipGetPropertyItemSize

 

Description

Gets the size, in bytes, of a specified property item of this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetPropertyItemSize(

    GpImage *image,

    PROPID propId,

    UINT* size

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPropertyItemSize ( _

    BYVAL pImage AS DWORD, _

    BYVAL propId AS DWORD, _

    BYREF psize AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

propId

[in] Integer that identifies the property item.

size

[out] Pointer to a variable that receives the size, in bytes, of a specified property item of this Image object.

 

GdipGetPropertySize

 

Description

Gets the total size, in bytes, of all the property items stored in this Image object. The GetPropertySize method also gets the number of property items stored in this Image object.

Syntax

GpStatus WINGDIPAPI GdipGetPropertySize(

    GpImage *image,

    UINT* totalBufferSize,

    UINT* numProperties

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPropertySize ( _

    BYVAL pImage AS DWORD, _

    BYREF totalBufferSize AS DWORD, _

    BYREF numProperties AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

totalBufferSize

[out] Pointer to a UINT that receives the total size, in bytes, of all the property items.

numProperties

[out] Pointer to a variable that receives the number of property items.

 

GdipImageForceValidation

 

Description

Forces validation of the image.

Syntax

GpStatus WINGDIPAPI GdipImageForceValidation(

    GpImage *image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageForceValidation ( _

    BYVAL pImage AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

 

GdipImageGetFrameCount

 

Description

Gets the number of frames in a specified dimension of this Image object.

Syntax

GpStatus WINGDIPAPI GdipImageGetFrameCount(

    GpImage *image,

    GDIPCONST GUID* dimensionID,

    UINT* count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageGetFrameCount ( _

    BYVAL pImage AS DWORD, _

    BYREF dimensionID AS GUID, _

    BYREF count AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

dimensionID

[in] Pointer to a globally unique identifier (GUID) that specifies the dimension.

count

[out] Pointer to a variable that receives the number of frames in the specified dimension of this Image object.

 

GdipImageGetFrameDimensionsCount

 

Description

Gets the number of frame dimensions in this Image object.

Syntax

GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(

    GpImage* image,

    UINT* count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageGetFrameDimensionsCount ( _

    BYVAL pImage AS DWORD, _

    BYREF count AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

count

[out] Pointer to a variable that receives the number of frame dimensions in this Image object.

 

GdipImageGetFrameDimensionsList

 

Description

Gets the identifiers for the frame dimensions of this Image object.

Syntax

GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(

    GpImage* image,

    GUID* dimensionIDs,

    UINT count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageGetFrameDimensionsList ( _

    BYVAL pImage AS DWORD, _

    BYREF dimensionIDs AS GUID, _

    BYVAL count AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

dimensionIDs

[out] Pointer to an array that receives the identifiers.

count

[in] Long integer value that specifies the number of elements in the dimensionIDs array. Call the GdipGetFrameDimensionsCount method to determine this number.

 

GdipImageRotateFlip

 

Description

Rotates and flips this image.

Syntax

GpStatus WINGDIPAPI GdipImageRotateFlip(

    GpImage *image,

    RotateFlipType rfType

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageRotateFlip ( _

    BYVAL pImage AS DWORD, _

    BYVAL rfType AS LONG _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

rfType

[in] Element of the RotateFlipType enumeration that specifies the type of rotation and the type of flip.

 

GdipImageSelectActiveFrame

 

Description

Selects the frame in this Image object specified by a dimension and an index.

Syntax

GpStatus WINGDIPAPI GdipImageSelectActiveFrame(

    GpImage *image,

    GDIPCONST GUID* dimensionID,

    UINT frameIndex

);

PowerBASIC Syntax

DECLARE FUNCTION GdipImageSelectActiveFrame ( _

    BYVAL pImage AS DWORD, _

    BYREF dimensionID AS GUID, _

    BYVAL frameIndex AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

dimensionID

[in] Pointer to a GUID that specifies the frame dimension.

frameIndex

[in] Long integer value that specifies the index of the frame within the specified frame dimension.

 

GdipImageSetAbort

 

Syntax

GpStatus WINGDIPAPI GdipImageSetAbort(

    GpImage *pImage,

    GdiplusAbort *pIAbort

)

Note  Doesn't exist in the export list of the GDIPLUS.DLL. Maybe it isn't still implemented.

 

 

GdipLoadImageFromFile

 

Description

Creates an Image object based on a file.

Syntax

GpStatus WINGDIPAPI GdipLoadImageFromFile(

    GDIPCONST WCHAR* filename,

    GpImage **image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipLoadImageFromFile ( _

    BYVAL pFilename AS STRING, _

    BYREF pImage AS DWORD _

) AS LONG

Parameters

 

filename

[in] Pointer to a null-terminated unicode string that specifies the name of the file.

image

[out] Pointer to a variable tghatg receives a pointer to the new created Image object.

 

GdipLoadImageFromFileICM

 

Description

Creates an Image object based on a file.

Syntax

GpStatus WINGDIPAPI GdipLoadImageFromFileICM(

    GDIPCONST WCHAR* filename,

    GpImage **image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipLoadImageFromFileICM ( _

    BYVAL pFilename AS STRING, _

    BYREF pImage AS DWORD _

) AS LONG

Parameters

 

filename

[in] Pointer to a wide-character string that specifies the name of the file.

image

[out] Pointer to a variable that receives a pointer to the new created Image object.

Remarks

The new Image object applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.

 

GdipLoadImageFromStream

 

Description

Creates an Image object based on a file.

Syntax

GpStatus WINGDIPAPI GdipLoadImageFromStream(

    IStream* stream,

    GpImage **image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipLoadImageFromStream ( _

    BYVAL pStream AS DWORD, _

    BYREF pImage AS DWORD _

) AS LONG

Parameters

 

stream

[in] Pointer to an IStream interface. The implementation of IStream must include the Seek, Read, and Stat methods.

image

[out] Pointer to the new created Image object.

 

GdipLoadImageFromStreamICM

 

Description

Creates an Image object based on a file.

Syntax

GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(

    IStream* stream,

    GpImage **image

);

PowerBASIC Syntax

DECLARE FUNCTION GdipLoadImageFromStreamICM ( _

    BYVAL pStream AS DWORD, _

    BYREF pImage AS DWORD _

) AS LONG

Parameters

 

stream

[in] Pointer to an IStream interface. The implementation of IStream must include the Seek, Read, and Stat methods.

image

[out] Pointer to the new created Image object.

Remarks

The new Image object applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.

 

GdipRemovePropertyItem

 

Description

Removes a property item (piece of metadata) from this Image object.

Syntax

GpStatus WINGDIPAPI GdipRemovePropertyItem(

    GpImage *image,

    PROPID propId

);

PowerBASIC Syntax

DECLARE FUNCTION GdipRemovePropertyItem ( _

    BYVAL pImage AS DWORD, _

    BYVAL propId AS DWORD _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

propID

[in] Long integer value that identifies the property item to be removed.

 

GdipSaveAdd

 

Description

Adds a frame to a file or stream specified in a previous call to the GdipSaveImageToFile or GdipSaveImageToStream functions. Use this method to save selected frames from a multiple-frame image to another multiple-frame image.

Syntax

GpStatus WINGDIPAPI GdipSaveAdd(

    GpImage *image,

    GDIPCONST EncoderParameters* encoderParams

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSaveAdd ( _

    BYVAL pImage AS DWORD, _

    BYREF encoderParams AS EncoderParameters _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

encoderParams

[in] Pointer to an EncoderParameters structure that holds parameters required by the image encoder used by the save-add operation.

 

GdipSaveAddImage

 

Description

Adds a frame to a file or stream specified in a previous call to the GdipSaveImageToFile or GdipSaveImageToStream functions.

Syntax

GpStatus WINGDIPAPI GdipSaveAddImage(

    GpImage *image,

    GpImage* newImage,

    GDIPCONST EncoderParameters* encoderParams

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSaveAddImage ( _

    BYVAL pImage AS DWORD, _

    BYVAL newImage AS DWORD, _

    BYREF encoderParams AS EncoderParameters _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

newImage

[in] Pointer to an Image object that holds the frame to be added.

encoderParams

[in] Pointer to an EncoderParameters structure that holds parameters required by the image encoder used by the save-add operation.

 

GdipSaveImageToFile

 

Description

Saves this image to a file.

Syntax

GpStatus WINGDIPAPI GdipSaveImageToFile(

    GpImage *image,

    GDIPCONST WCHAR* filename,

    GDIPCONST CLSID* clsidEncoder,

    GDIPCONST EncoderParameters* encoderParams

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSaveImageToFile ( _

    BYVAL pImage AS DWORD, _

    BYVAL pFilename AS STRING, _

    BYREF clsidEncoder AS GUID, _

    BYREF encoderParams AS EncoderParameters _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

filename

[in] Pointer to a null-terminated unicode string that specifies the path name for the saved image.

clsidEncoder

[in] Pointer to a CLSID that specifies the encoder to use to save the image.

encoderParams

[in]  Pointer to an EncoderParameters structure that holds parameters used by the encoder. The default value is NULL.

 

GdipSaveImageToStream

 

Description

Saves this image to a stream.

Syntax

GpStatus WINGDIPAPI GdipSaveImageToStream(

    GpImage *image,

    IStream* stream,

    GDIPCONST CLSID* clsidEncoder,

    GDIPCONST EncoderParameters* encoderParams

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSaveImageToStream ( _

    BYVAL pImage AS DWORD, _

    BYVAL pStream AS DWORD, _

    BYREF clsidEncoder AS GUID, _

    BYREF encoderParams AS EncoderParameters _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

stream

[in] Pointer to an IStream COM interface. The implementation of IStream must include the Seek, Read, Write, and Stat methods.

clsidEncoder

[in] Pointer to a CLSID that specifies the encoder to use to save the image.

encoderParams

[in] Pointer to an EncoderParameters structure that holds parameters used by the encoder. The default value is NULL.

 

GdipSetImagePalette

 

Description

Sets the color palette of this Image object.

Syntax

GpStatus WINGDIPAPI GdipSetImagePalette(

    GpImage *image,

    GDIPCONST ColorPalette *palette

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetImagePalette ( _

    BYVAL pImage AS DWORD, _

    BYREF palette AS ColorPalette _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

palette

[in] Pointer to a ColorPalette structure that specifies the palette.

 

GdipSetPropertyItem

 

Description

Sets a property item (piece of metadata) for this Image object. If the item already exists, then its contents are updated; otherwise, a new item is added.

Syntax

GpStatus WINGDIPAPI GdipSetPropertyItem(

    GpImage *image,

    GDIPCONST PropertyItem* item

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetPropertyItem ( _

    BYVAL pImage AS DWORD, _

    BYREF item AS PropertyItem _

) AS LONG

Parameters

 

image

[in] Pointer to the Image object.

item

[in] Pointer to a PropertyItem object that specifies the property item to be set.

 

Page last updated on Monday, 11 December 2006 11:02:14 +0100