public void SetImage(PictureBox picbox, String fileName) { try { try { picbox.Image = tb.GetThumbnail(fileName); } catch (Exception e) { picbox.Image = global::SortImage.Properties.Resources.thumberror; System.Diagnostics.Debug.WriteLine("Corrupt on transpanel: " + e); } picbox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Can't open file stream to load image for transpanel: " + ex); } }
public void LoadImage(string imageFilename, ThumbnailBuilder tnb) { image = tnb.GetThumbnail(imageFilename); imageLocation = imageFilename; }