Delegate PDFViewWPF.OnThumbnailGeneratedEventHandler
Delegate for when PDFViewWPF has finished rendering a requested thumbnail.
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public delegate void OnThumbnailGeneratedEventHandler(int pageNumber, byte[] thumb, int w, int h);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageNumber | page number that this thumbnail is for. |
System.Byte[] | thumb | raw thumbnail image in Bgra32 format. |
System.Int32 | w | width of the thumbnail. |
System.Int32 | h | height of the thumbnail. |
Examples
To create a BitmapSource from this event use the following
PixelFormat fmt = PixelFormats.Bgra32;
BitmapSource bps = BitmapSource.Create(w, h, 96.0, 96.0, fmt, null, thumb, (w * fmt.BitsPerPixel + 7) / 8);
Constructors
OnThumbnailGeneratedEventHandler(Object, IntPtr)
Declaration
public OnThumbnailGeneratedEventHandler(object A_0, IntPtr A_1)
Parameters
Type | Name | Description |
---|---|---|
System.Object | A_0 | |
System.IntPtr | A_1 |
Methods
BeginInvoke(Int32, Byte[], Int32, Int32, AsyncCallback, Object)
Declaration
public IAsyncResult BeginInvoke(int pageNumber, byte[] thumb, int w, int h, AsyncCallback callback, object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageNumber | |
System.Byte[] | thumb | |
System.Int32 | w | |
System.Int32 | h | |
System.AsyncCallback | callback | |
System.Object | obj |
Returns
Type | Description |
---|---|
System.IAsyncResult |
EndInvoke(IAsyncResult)
Declaration
public void EndInvoke(IAsyncResult result)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | result |
Invoke(Int32, Byte[], Int32, Int32)
Declaration
public void Invoke(int pageNumber, byte[] thumb, int w, int h)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageNumber | |
System.Byte[] | thumb | |
System.Int32 | w | |
System.Int32 | h |