Image::SelectActiveFrame method

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

dimensionID

Type: const GUID*

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

frameIndex

Type: UINT

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

Return Value

Type: 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

   
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