Load thumbnail image into PictureBox from directory
I use the following code to get thumbnail of image in Resources, and display on Picturebox.
Image tmp = (System.Drawing.Im开发者_运维百科age)myManager.GetObject(tempImage);
cfgPassPicture[m].Image = tmp.GetThumbnailImage(40, 40, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), System.IntPtr.Zero);
How do I do this for images in directory (instead of resources), given only the URL? I can load image into PictureBox via ImageLocation property, but not sure how to use Image property of PictureBox for this.
Thanks
myPictureBox.Image = Image.FromFile("yourimagepath.jpg");
精彩评论