Live Chat Icon For mobile
Live Chat Icon

How can I create a thumbnail of a bitmap?

Platform: WinForms| Category: Bitmaps and Images

You can use the GetThumbnailImage method to generate and display a thumbnail of a bitmap as shown below:


public bool ThumbnailCallback()
	return false;

//Generate a thumbnail of the bitmap and display it in a PictureBox

Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
Bitmap myBitmap = new Bitmap('C:\\images\\MyBitMap.bmp');
this.pictureBox1.Image = (Bitmap) myBitmap.GetThumbnailImage(150,75,myCallback, IntPtr.Zero);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.