public Image GetThumb() { if (ImageIn == null) { throw new Exception("Image to work with has not been defined"); } return(((Image)ImageIn.Clone()).GetThumbnailImage(200, ((200 * ImageIn.Height) / ImageIn.Width), null, IntPtr.Zero)); }
public void Resize(Size newSize) { ImageOut = ((Image)ImageIn.Clone()).GetThumbnailImage(ImageSize.Width, ImageSize.Height, null, IntPtr.Zero); // Rectangle compressionRectangle = new Rectangle(0, 0,ImageSize.Width, ImageSize.Height); // Graphics g = Graphics.FromImage(ImageOut); // g.DrawImage(ImageOut, ImageSize.Width, ImageSize.Height); // g.Dispose(); }