GetImageEncoders function (gdiplusimagecodec.h)

The GetImageEncoders function gets an array of ImageCodecInfo objects that contain information about the available image encoders.

Syntax

Status GetImageEncoders(
  [in]  UINT           numEncoders,
  [in]  UINT           size,
  [out] ImageCodecInfo *encoders
);

Parameters

[in] numEncoders

Type: UINT

Integer that specifies the number of available image encoders. Call GetImageEncodersSize to determine this number.

[in] size

Type: UINT

Integer that specifies the size, in bytes, of the array of ImageCodecInfo objects. Call GetImageEncodersSize to determine this number.

[out] encoders

Type: ImageCodecInfo*

Pointer to a buffer that receives the array of ImageCodecInfo objects. You must allocate memory for this buffer. Call GetImageEncodersSize to determine the size of the required buffer.

Return value

Type: Status

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.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusimagecodec.h (include Gdiplus.h)
Library Gdiplus.lib

See also

Bitmap

GetImageDecoders

GetImageDecodersSize

GetImageEncodersSize

Image

Metafile

Using Image Encoders and Decoders