Image::SelectActiveFrame method (gdiplusheaders.h)

The Image::SelectActiveFrame method selects the frame in this Image object specified by a dimension and an index.

Syntax

Status SelectActiveFrame(
  [in] const GUID *dimensionID,
  [in] UINT       frameIndex
);

Parameters

[in] dimensionID

Type: const GUID*

Pointer to a GUID that specifies the frame dimension. GUIDs that identify various frame dimensions are defined in Gdiplusimaging.h.

[in] frameIndex

Type: UINT

Integer that specifies the index of the frame within the specified frame dimension.

Return value

Type: Status

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

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

Remarks

When you call the Image::SelectActiveFrame method, all changes that you made to the previously active frame are discarded. If you want to retain changes that you make to a frame, call the Save method before you switch to a different frame.

Among all the image formats currently supported by GDI+, the only formats that support multiple-frame images are GIF and TIFF. When you call the Image::SelectActiveFrame method on a GIF image, you should use FrameDimensionTime. When you call the Image::SelectActiveFrame method on a TIFF image, you should use FrameDimensionPage.

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 gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

EncoderParameter

EncoderParameters

GetImageEncoders

Image

Image::Save Methods

Image::SaveAdd Methods

Using Image Encoders and Decoders