Bloom.Publish.PublishModel.GetThumbnailAsync C# (CSharp) Method

GetThumbnailAsync() public method

public GetThumbnailAsync ( int width, int height, HtmlDom dom, Action onReady, Action onError ) : void
width int
height int
dom Bloom.Book.HtmlDom
onReady Action
onError Action
return void
        public void GetThumbnailAsync(int width, int height, HtmlDom dom,Action<Image> onReady ,Action<Exception> onError)
        {
            var thumbnailOptions = new HtmlThumbNailer.ThumbnailOptions()
            {
                BackgroundColor = Color.White,
                BorderStyle = HtmlThumbNailer.ThumbnailOptions.BorderStyles.None,
                CenterImageUsingTransparentPadding = false,
                Height = height,
                Width = width
            };
            dom.UseOriginalImages = true; // apparently these thumbnails can be big...anyway we want printable images.
            _thumbNailer.HtmlThumbNailer.GetThumbnailAsync(String.Empty, string.Empty, dom, thumbnailOptions,onReady, onError);
        }