GetThumbnailImage获得缩略图;
Image *GetThumbnailImage(
UINT thumbWidth, //宽度(像素)
UINT thumbHeight, //高度(像素)
GetThumbnailImageAbort callback,
VOID *callbackData);
callback 可选。您提供的回调函数。在创建或检索的缩略图图像处理,微软Windows GDI +中调用该函数,让您有机会中止这一进程。默认值是NULL。
callbackData可选。指针指向的内存块,它包含要由回调函数使用的数据。默认值是NULL
MSDN 例子
VOID Example_GetThumbnail(HDC hdc)
{
Graphics graphics(hdc);
// Create an image and a thumbnail of the image.
Image image(L"Crayons.jpg");
Image* pThumbnail = image.GetThumbnailImage(40, 40, NULL, NULL);
// Draw the original and the thumbnail images.
graphics.DrawImage(&image, 10, 10, image.GetWidth(), image.GetHeight());
graphics.DrawImage(
pThumbnail,
150,
10,
pThumbnail->GetWidth(),
pThumbnail->GetHeight());
delete pThumbnail;
}