Image::FindFirstItem method (gdiplusheaders.h)

The Image::FindFirstItem method retrieves the description and the data size of the first metadata item in this Image object.

Syntax

Status FindFirstItem(
  [in, out] ImageItemData *item
);

Parameters

[in, out] item

Type: ImageItemData*

Pointer to an ImageItemData object. On input, the Desc member points to a buffer (allocated by the caller) large enough to hold the metadata description (1 byte for JPEG, 4 bytes for PNG, 11 bytes for GIF), and the DescSize member specifies the size (1, 4, or 6) of the buffer pointed to by Desc. On output, the buffer pointed to by Desc receives the metadata description, and the DataSize member receives the size, in bytes, of the metadata itself.

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

Use Image::FindFirstItem along with Image::FindNextItem to enumerate the metadata items, including custom metadata, stored in an image. Image::FindFirstItem and Image::FindNextItem do not enumerate the metadata items stored by the Image::SetPropertyItem method.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Image

Image::GetItemData