Articles in this section
Category / Section

How can I generate a thumbnail image of my Diagram?

3 mins read

Generate thumbnail image in Diagram

If you want to display a thumbnail image of the Diagram:

a) Generate a Bitmap image.

b) Use the GetThumbnailImage method of the Image class to generate a thumbnail and set it to be the image of the PictureBox in which you want to display the thumbnail as shown below:

[C#]

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); GetThumbnailImage Method

 

[VB.NET]

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)

 

Conclusion

I hope you enjoyed learning about how to generate a thumbnail image of your Diagram.

You can refer to WinForms Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms Diagram example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied