How To Generate a Thumbnail Image Of a Diagram
29 Feb 2016 / 1 minute to read
To display a thumbnail image of the diagram, follow the below given steps.
- Generate a Bitmap image of the diagram.
- Use the GetThumbnailImage method of the Image class to generate a thumbnail, and set it as the image of the picture box in which you want to display the thumbnail.
The following code illustrates this.
public bool ThumbnailCallback()
{
return false;
}
//Generate Thumbnail and set it to be image of the PictureBox
Image.GetThumbnailImageAbort myCallback = new Image.GetThumbnailImageAbort(ThumbnailCallback);
this.pictureBox1.Image = (Bitmap) diagramimage.GetThumbnailImage(150,75,myCallback, IntPtr.Zero);
Public Function ThumbnailCallback() As Boolean
Return False
End Function
'Generate Thumbnail and set it to be image of the PictureBox
Dim myCallback As Image.GetThumbnailImageAbort = New Image.GetThumbnailImageAbort(ThumbnailCallback)
Me.pictureBox1.Image = CType(diagramimage.GetThumbnailImage(150,75,myCallback, IntPtr.Zero), Bitmap)
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page