replace ThumbnailCallback with std::function