ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_frame_image_get |
This function retrieves the HIGEAR of the given frame's image.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_mult_frame_image_get( HIGMULT hMult, AT_UINT frameNum, LPHIGEAR lphIGear ); |
Name | Type | Description |
hMult | HIGMULT | Multimedia instance handle. |
frameNum | AT_UINT | Frame number to get image for (0 = first frame). |
lphIGear | LPHIGEAR | Image handle. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
Media Player
Copy Code
|
|
---|---|
/* Saves first frame as a 128-pixel-wide thumbnail */ AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGMULT hMult; /* Multimedia instance handle */ HIGEAR hIGear; /* HIGEAR handle of image */ HIGEAR hIGearCopy; /* HIGEAR handle of duplicate */ AT_DIMENSION w, h; /* Width and height of image */ nErrcount = IG_mult_current_frame_reset(hMult); nErrcount = IG_mult_current_frame_image_get(hMult, &hIGear); nErrcount = IG_image_duplicate(hIGear, &hIGearCopy); nErrcount = IG_image_dimensions_get(hIGearCopy, &w, &h, NULL); nErrcount = IG_IP_resize(hIGearCopy, 128, (AT_DIMENSION) ((float) h / (float) w * 128), IG_INTERPOLATION_BICUBIC); nErrcount = IG_save_file(hIGearCopy, "thumb.jpg", IG_SAVE_JPG); nErrcount = IG_image_delete(hIGearCopy); |
This image is owned by ImageGear. You can perform read-only operations such as display or save to a file, but do not attempt to free or alter the image. If you need to alter the image (resize it, for example), use IG_image_duplicate() to make a copy of the image, work with the copy, and free it with IG_image_delete() when finished.