Home COM GDI+ WebBrowser Data Access 

Bitmap Functions (GDI+)

 

 

The Bitmap functions expands on the capabilities of the Image functions by providing additional methods for creating and manipulating raster images.

 

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.

 

GdipBitmapApplyEffect

 

Syntax

GpStatus WINGDIPAPI GdipBitmapApplyEffect(

    GpBitmap* bitmap,

    CGpEffect *effect,

    RECT *roi,

    BOOL useAuxData,

    VOID **auxData,

    INT *auxDataSize

);

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

 

 

GdipBitmapConvertFormat

 

Syntax

GpStatus WINGDIPAPI GdipBitmapConvertFormat(

    IN GpBitmap *pInputBitmap,

    PixelFormat format,

    DitherType dithertype,

    PaletteType palettetype,

    ColorPalette *palette,

    REAL alphaThresholdPercent

);

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

 

 

GdipBitmapCreateApplyEffect

 

Syntax

GpStatus WINGDIPAPI GdipBitmapCreateApplyEffect(

    GpBitmap **inputBitmaps,

    INT numInputs,

    CGpEffect *effect,

    RECT *roi,

    RECT *outputRect,

    GpBitmap **outputBitmap,

    BOOL useAuxData,

    VOID **auxData,

    INT *auxDataSize

);

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

 

 

GdipBitmapGetHistogram

 

Syntax

GpStatus WINGDIPAPI GdipBitmapGetHistogram(

    GpBitmap* bitmap,

    IN HistogramFormat format,

    IN UINT NumberOfEntries,

    OUT UINT *channel0,

    OUT UINT *channel1,

    OUT UINT *channel2,

    OUT UINT *channel3

);

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

 

 

GdipBitmapGetHistogramSize

 

Syntax

GpStatus WINGDIPAPI GdipBitmapGetHistogramSize(

    IN HistogramFormat format,

    OUT UINT *NumberOfEntries

);

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

 

 

GdipBitmapGetPixel

 

Description

Gets the color of a specified pixel in this bitmap.

Syntax

GpStatus WINGDIPAPI GdipBitmapGetPixel(

    GpBitmap* bitmap,

    INT x,

    INT y,

    ARGB *color

);

PowerBASIC Syntax

DECLARE FUNCTION GdipBitmapGetPixel ( _

    BYVAL pBitmap AS DWORD, _

    BYVAL x AS LONG, _

    BYVAL y AS LONG, _

    BYREF pcolor AS DWORD _

) AS LONG

Parameters

 

bitmap

[in] Pointer to the Bitmap object.

x

[in] Long value that specifies the x-coordinate (column) of the pixel.

y

[in] Long value that specifies the y-coordinate (row) of the pixel.

color

[out] Pointer to a DWORD variable that receives the color of the specified pixel.

Remarks

Depending on the format of the bitmap, GdipBitmapGetPixel might not return the same value as was set by GdipBitmapSetPixel. For example, if you call GdipBitmapSetPixel on a Bitmap object whose pixel format is 32bppPARGB, the pixel's RGB components are premultiplied. A subsequent call to GdipBitmapGetPixel might return a different value because of rounding. Also, if you call GdipBitmapSetPixel on a Bitmap object whose color depth is 16 bits per pixel, information could be lost during the conversion from 32 to 16 bits, and a subsequent call to GdipBitmapGetPixel might return a different value.

 

GdipBitmapLockBits

 

Description

Locks a rectangular portion of this bitmap and provides a temporary buffer that you can use to read or write pixel data in a specified format. Any pixel data that you write to the buffer is copied to the Bitmap object when you call GdipBitmapUnlockBits.

Syntax

GpStatus WINGDIPAPI GdipBitmapLockBits(

    GpBitmap* bitmap,

    GDIPCONST GpRect* rect,

    UINT flags,

    PixelFormat format,

    BitmapData* lockedBitmapData

);

PowerBASIC Syntax

DECLARE FUNCTION GdipBitmapLockBits ( _

    BYVAL pbitmap AS DWORD, _

    BYREF prect AS RECTL, _

    BYVAL flags AS LONG, _

    BYVAL PixelFormat AS LONG, _

    BYREF lockedBitmapData AS BitmapData _

) AS LONG

Parameters

 

bitmap

[in] Pointer to the Bitmap object.

rec

[in] Pointer to a rectangle that specifies the portion of the bitmap to be locked.

flags

[in] Set of flags that specify whether the locked portion of the bitmap is available for reading or for writing and whether the caller has already allocated a buffer. Individual flags are defined in the ImageLockMode enumeration.

format

[in] Long integer value that specifies the format of the pixel data in the temporary buffer. The pixel format of the temporary buffer does not have to be the same as the pixel format of this Bitmap object. Microsoft® Windows® GDI+ version 1.0 does not support processing of 16-bits-per-channel images, so you should not set this parameter equal to PixelFormat48bppRGB, PixelFormat64bppARGB, or PixelFormat64bppPARGB.

lockedBitmapData

[in, out] Pointer to a BitmapData object. If the ImageLockModeUserInputBuf flag of the flags parameter is cleared, then lockedBitmapData serves only as an output parameter. In that case, the Scan0 data member of the BitmapData object receives a pointer to a temporary buffer, which is filled with the values of the requested pixels. The other data members of the BitmapData object receive attributes (width, height, format, and stride) of the pixel data in the temporary buffer. If the pixel data is stored bottom-up, the Stride data member is negative. If the pixel data is stored top-down, the Stride data member is positive. If the ImageLockModeUserInputBuf flag of the flags parameter is set, then lockedBitmapData serves as an input parameter (and possibly as an output parameter). In that case, the caller must allocate a buffer for the pixel data that will be read or written. The caller also must create a BitmapData object, set the Scan0 data member of that BitmapData object to the address of the buffer, and set the other data members of the BitmapData object to specify the attributes (width, height, format, and stride) of the buffer.

 

GdipBitmapSetPixel

 

Description

Sets the color of a specified pixel in this bitmap.

Syntax

GpStatus WINGDIPAPI GdipBitmapSetPixel(

    GpBitmap* bitmap,

    INT x,

    INT y,

    ARGB color

);

PowerBASIC Syntax

DECLARE FUNCTION GdipBitmapSetPixel ( _

    BYVAL pbitmap AS DWORD, _

    BYVAL x AS LONG, _

    BYVAL y AS LONG, _

    BYVAL pcolor AS DWORD _

) AS LONG

Parameters

 

bitmap

[in] Pointer to the Bitmap object.

x

[in] Long integer value that specifies the x-coordinate (column) of the pixel.

y

[in] Long integer value that specifies the y-coordinate (row) of the pixel.

color

[in] ARGB color value that specifies the color to set.

 

GdipBitmapSetResolution

 

Description

Sets the resolution of this Bitmap object.

Syntax

GpStatus WINGDIPAPI GdipBitmapSetResolution(

    GpBitmap* bitmap,

    REAL xdpi,

    REAL ydpi

);

PowerBASIC Syntax

DECLARE FUNCTION GdipBitmapSetResolution ( _

    BYVAL pbitmap AS DWORD, _

    BYVAL xdpi AS SINGLE, _

    BYVAL ydpi AS SINGLE _

) AS LONG

Parameters

 

bitmap

[in] Pointer to the Bitmap object.

xdpi

[in] Single precision value that specifies the horizontal resolution in dots per inch.

ydpi

[in] Single precision value that specifies the vertical resolution in dots per inch.

 

GdipBitmapUnlockBits

 

Description

Unlocks a portion of this bitmap that was previously locked by a call to GdipBitmapLockBits.

Syntax

GpStatus WINGDIPAPI GdipBitmapUnlockBits(

    GpBitmap* bitmap,

    BitmapData* lockedBitmapData

);

PowerBASIC Syntax

DECLARE FUNCTION GdipBitmapUnlockBits ( _

    BYVAL pBitmap AS DWORD, _

    BYREF lockedBitmapData AS BitmapData _

) AS LONG

Parameters

 

bitmap

[in] Pointer to the Bitmap object.

lockedBitmapData

[in] Pointer to a BitmapData structure that was previously passed to GdipBitmapLockBits.

Remarks

GdipBitmapLockBits and GdipBitmapUnlockBits must be used as a pair. A call to GdipBitmapLockBits establishes a temporary buffer that you can use to read or write pixel data in a specified format. After you write to the temporary buffer, a call to GdipBitmapUnlockBits copies the pixel data in the buffer to the Bitmap object. If the pixel format of the temporary buffer is different from the pixel format of the Bitmap object, the pixel data is converted appropriately.

 

GdipCloneBitmapArea

 

Description

Creates a new Bitmap object by copying a portion of this bitmap.

Syntax

GpStatus WINGDIPAPI GdipCloneBitmapArea(

    REAL x,

    REAL y,

    REAL width,

    REAL height,

    PixelFormat format,

    GpBitmap *srcBitmap,

    GpBitmap **dstBitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCloneBitmapArea ( _

    BYVAL x AS SINGLE, _

    BYVAL y AS SINGLE, _

    BYVAL nWidth AS SINGLE, _

    BYVAL nHeight AS SINGLE, _

    BYVAL PixelFormat AS LONG, _

    BYVAL srcBitmap AS DWORD, _

    BYREF dstBitmap AS DWORD _

) AS LONG

Parameters

 

x

[in] Single precision value that specifies the x-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.

y

[in] Single precision value that specifies the y-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.

width

[in] Single precision value that specifies the width of the rectangle that specifies the portion of this bitmap to copy.

height

[in] Single precision value that specifies the height of the rectangle that specifies the portion of this image to copy.

format

[in] Long integer value that specifies the pixel format of the new bitmap.

srcBitmap

[in] Pointer to the source Bitmap object.

destBitmap

[out] Pointer to a DWORD variable that received a pointer  to the cloned Bitmap object.

 

GdipCloneBitmapArea

 

Description

Creates a new Bitmap object by copying a portion of this bitmap.

Syntax

GpStatus WINGDIPAPI GdipCloneBitmapArea(

    INT x,

    INT y,

    INT width,

    INT height,

    PixelFormat format,

    GpBitmap *srcBitmap,

    GpBitmap **dstBitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCloneBitmapAreaI ( _

    BYVAL x AS LONG, _

    BYVAL y AS LONG, _

    BYVAL nWidth AS LONG, _

    BYVAL nHeight AS LONG, _

    BYVAL PixelFormat AS LONG, _

    BYVAL srcBitmap AS DWORD, _

    BYREF dstBitmap AS DWORD _

) AS LONG

Parameters

 

x

[in] Long integer value that specifies the x-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.

y

[in] Long integer value that specifies the y-coordinate of the upper-left corner of the rectangle that specifies the portion of this bitmap to copy.

width

[in] Long integer value that specifies the width of the rectangle that specifies the portion of this bitmap to copy.

height

[in] Long integer value that specifies the height of the rectangle that specifies the portion of this image to copy.

format

[in] Long integer value that specifies the pixel format of the new bitmap.

srcBitmap

[in] Pointer to a DWORD variable that receives a pointer to  the source Bitmap object.

destBitmap

[out] Pointer to the cloned Bitmap object.

 

GdipCreateBitmapFromDirectDrawSurface

 

Description

Creates a Bitmap object based on a DirectDraw surface. The Bitmap object maintains a reference to the DirectDraw surface until the Bitmap object is deleted or goes out of scope.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromDirectDrawSurface(

    IDirectDrawSurface7* surface,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromDirectDrawSurface ( _

    BYVAL Surface AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

surface

[in] Pointer to an IDrectDrawSurface7 COM interface.

bitmap

[out] Pointer to a DWORD variable that receives a pointer to a Bitmap object.

 

GdipCreateBitmapFromFile

 

Description

Creates a Bitmap object based on an image file.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromFile(

    GDIPCONST WCHAR* filename,

    GpBitmap **bitmap

):

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromFile ( _

    BYVAL pFilename AS STRING, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

filename

[in] Pointer to a null-terminated unicode string that specifies the path name of the image file. The graphics file formats supported by GDI+ are BMP, GIF, JPEG, PNG, TIFF, Exif, WMF, and EMF.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromFileICM

 

Description

Creates a Bitmap object based on an image file. This function uses ICM.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(

    GDIPCONST WCHAR* filename,

    GpBitmap **bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromFileICM ( _

    BYVAL pFilename AS STRING, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

filename

[in] Pointer to a null-terminated unicode string that specifies the path name of the image file. The graphics file formats supported by GDI+ are BMP, GIF, JPEG, PNG, TIFF, Exif, WMF, and EMF.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromGdiDib

 

Description

Creates a Bitmap object based on a BITMAPINFO structure and an array of pixel data.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(

    GDIPCONST BITMAPINFO* gdiBitmapInfo,

    VOID* gdiBitmapData,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromGdiDib ( _

    BYREF GdiBitmapInfo AS BITMAPINFO, _

    BYVAL gdiBitmapData AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

gdiBitmapInfo

[in] Pointer to a Microsoft® Windows® Graphics Device Interface (GDI)BITMAPINFO structure.

gdiBitmapData

[in] Pointer to an array of bytes that contains the pixel data.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromGraphics

 

Description

Creates a Bitmap object based on a Graphics object, a width, and a height.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(

    INT width,

    INT height,

    GpGraphics* target,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromGraphics ( _

    BYVAL nWidth AS LONG, _

    BYVAL nHeight AS LONG, _

    BYVAL ptarget AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

width

[in] Long integer value that specifies the width, in pixels, of the bitmap.

height

[in] Long integer value that specifies the height, in pixels, of the bitmap.

target

[in] Pointer to a Graphics object that contains information used to initialize certain properties (for example, dots per inch) of the new Bitmap object.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromHBITMAP

 

Description

Creates a Bitmap object based on a handle to a Windows Microsoft® Windows® Graphics Device Interface (GDI) bitmap and a handle to a GDI palette.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(

    HBITMAP hbm,

    HPALETTE hpal,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromHBITMAP ( _

    BYVAL hbm AS DWORD, _

    BYVAL hpal AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

hbm

[in] Handle to a GDI bitmap.

hpal

[in] Handle to a GDI palette used to define the bitmap colors if hbm is not a device-independent bitmap (DIB).

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromHICON

 

Description

Creates a Bitmap object based on an icon.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(

    HICON hicon,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromHICON ( _

    BYVAL hicon AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

hicon

[in] Handle to a Microsoft® Windows® Graphics Device Interface (GDI) icon.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromResource

 

Description

Creates a Bitmap object based on an application or dynamic-link library (DLL) instance handle and the name of a bitmap resource.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromResource(

    HINSTANCE hInstance,

    GDIPCONST WCHAR* lpBitmapName,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromResource ( _

    BYVAL hInstance AS DWORD, _

    BYVAL lpBitmapName AS STRING, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

hInstance

[in] Handle to an instance of a module whose executable file contains a bitmap resource.

bitmapName

[in] Pointer to a null-terminated unicode string that specifies the path name of the bitmap resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromScan0

 

Description

Creates a Bitmap object based on an array of bytes along with size and format information.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(

    INT width,

    INT height,

    INT stride,

    PixelFormat format,

    BYTE* scan0,

    GpBitmap** bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromScan0 ( _

    BYVAL nWidth AS LONG, _

    BYVAL nHeight AS LONG, _

    BYVAL stride AS LONG, _

    BYVAL PixelFormat AS LONG, _

    BYREF Scan0 AS ANY, _

    BYREF pbitmap AS DWORD _

) AS LONG

Note  The scan0 parameter is treated as a byte array

 

Parameters

 

width

[in] Long integer value that specifies the width, in pixels, of the bitmap.

height

[in] Long integer value that specifies the height, in pixels, of the bitmap.

stride

[in] Long integer value that specifies the byte offset between the beginning of one scan line and the next. This is usually (but not necessarily) the number of bytes in the pixel format (for example, 2 for 16 bits per pixel) multiplied by the width of the bitmap. The value passed to this parameter must be a multiple of four.

format

[in] Long integer value that specifies the pixel format of the bitmap.

scan0

[in] Pointer to an array of bytes that contains the pixel data. The caller is responsible for allocating and freeing the block of memory pointed to by this parameter.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromStream

 

Description

Creates a Bitmap object based on a stream.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromStream(

    IStream* stream,

    GpBitmap **bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromStream ( _

    BYVAL pstream AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

stream

[in] Pointer to an IStream COM interface.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateBitmapFromStreamICM

 

Description

Creates a Bitmap object based on a stream. This function uses ICM.

Syntax

GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(

    IStream* stream,

    GpBitmap **bitmap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateBitmapFromStreamICM ( _

    BYVAL pstream AS DWORD, _

    BYREF pbitmap AS DWORD _

) AS LONG

Parameters

 

stream

[in] Pointer to an IStream COM interface.

bitmap

[out] Pointer to a DWORD variable that recives a pointer to a Bitmap object.

 

GdipCreateEffect

 

Syntax

Status __stdcall GdipCreateEffect(

    const GUID guid,

    CGpEffect **effect

):

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

 

 

GdipCreateHBITMAPFromBitmap

 

Syntax

GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(

    GpBitmap* bitmap,

    HBITMAP* hbmReturn,

    ARGB background

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateHBITMAPFromBitmap ( _

    BYVAL pbitmap AS DWORD, _

    BYREF hbmReturn AS DWORD, _

    BYVAL background AS DWORD _

) AS LONG

 

GdipCreateHICONFromBitmap

 

Syntax

GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(

    GpBitmap* bitmap,

    HICON* hbmReturn

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateHICONFromBitmap ( _

    BYVAL pbitmap AS DWORD, _

    BYREF hbmReturn AS DWORD _

) AS LONG

 

GdipDeleteEffect

 

Syntax

Status __stdcall GdipDeleteEffect(

    CGpEffect *effect

);

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

 

 

GdipGetEffectParameters

 

Syntax

Status __stdcall GdipGetEffectParameterSize(

    CGpEffect *effect,

    const VOID *params,

    const UINT size

);

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

 

 

GdipGetEffectParameterSize

 

Syntax

Status __stdcall GdipGetEffectParameterSize(

    CGpEffect *effect,

    UINT *size

);

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

 

 

GdipInitializePalette

 

Syntax

GpStatus WINGDIPAPI GdipInitializePalette(

    OUT ColorPalette *palette,

    PaletteType palettetype,

    INT optimalColors,

    BOOL useTransparentColor,

    GpBitmap *bitmap

);

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

 

 

GdipSetEffectParameters

 

Syntax

Status __stdcall GdipSetEffectParameters(

    CGpEffect *effect,

    const VOID *params,

    const UINT size

);

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

 

 

GdipTestControl

 

Syntax

GpStatus WINGDIPAPI GdipTestControl(

    GpTestControlEnum control,

    void * param

);

PowerBASIC Syntax

DECLARE FUNCTION GdipTestControl ( _

    BYVAL pControl AS DWORD, _

    BYVAL param AS DWORD _

) AS LONG

Remarks

Used for internal testing of Microsoft® Windows® GDI+. Specifies changes in image-processing behavior. The meaning of the param parameter varies depending on the value passed in the control parameter.

If the control parameter is set to TestControlForceBilinear, param points to a boolean value. If that value is TRUE and the current interpolation mode is anything other than InterpolationModeNearestNeighbor, then the InerpolationModeBilinear algorithm is used. If the value pointed to by param is FALSE or if the current interpolation mode is InterpolationModeNearestNeighbor, then the behavior of GDI+ is unchanged.

If the control parameter is set to TestControlNoICM, param points to a boolean value. If that value is TRUE, then ICM profiles are ignored when images are loaded into memory. If the value pointed to by param is FALSE, then the behavior of GDI+ is unchanged.

If the control parameter is set to TestControlGetBuildNumber, param is an output parameter that points to a 32-bit integer variable. That variable receives the GDI+ build number.

GdipTestControl is not thread-safe; it assumes that there is only one thread using GDI+. If you call GdipTestControl in a multithreaded environment, the results are unpredictable.

The GpTestControlEnum enumeration has three elements: TestControlForceBilinear = 0, TestControlNoICM = 1, and TestControlGetBuildNumber = 2.

 

Page last updated on Monday, 11 December 2006 11:03:32 +0100