Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Image.FindNextItem method

Applies to: desktop apps only

The Image::FindNextItem method is used along with the Image::FindFirstItem method to enumerate the metadata items stored in this Image object. The Image::FindNextItem method retrieves the description and the data size of the next metadata item in this Image object.

Syntax

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

Parameters

item [in, out]

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:

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

Image::FindFirstItem and Image::FindNextItem do not enumerate the metadata items stored by the Image::SetPropertyItem method.

Examples

The following example displays the description and data size for each metadata item in an Image object.


Status stat;        
Image image(L"River5.png");

CHAR descBuf[5] = {0, 0, 0, 0, 0};
ImageItemData itemData;
ZeroMemory(&itemData, sizeof(itemData));
itemData.Size = sizeof(itemData);
itemData.DescSize = 4;
itemData.Desc = descBuf;

stat = image.FindFirstItem(&itemData);

while(Ok == stat)
{
   printf("%s   %d\n", itemData.Desc, itemData.DataSize);
   stat = image.FindNextItem(&itemData);
}

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Product

GDI+ 1.1

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Image
Image::GetItemData

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2015 Microsoft