Private void Create_Validate_Image ()
{
System. Drawing. Bitmap validate_image = new System. Drawing. Bitmap (width, height );
System. Drawing. Image image11 = System. Drawing. Image. FromFile (System. Web. HttpContext. Current. Request. MapPath ("42.jpg "));
Var image112 = image11.GetThumbnailImage (image11.Width/2, image11.Height/2, () =>{ return false ;}, IntPtr. Zero );
Graphics g = Graphics. FromImage (validate_image );
G. Clear (Color. White );
G. DrawImage (image112, 0, 0 );
System. IO. MemoryStream MS = new System. IO. MemoryStream ();
Validate_image.Save (MS, ImageFormat. Gif );
Response. ClearContent ();
Response. ContentType = "image/GIF ";
Response. BinaryWrite (ms. ToArray ());
G. Dispose ();
Validate_image.Dispose ();
}
// Flip
ImgPng. RotateFlip (RotateFlipType. Rotate180FlipX );
Intercept
Rectangle
Rect = new
Rectangle (0, 0, imgPng. Width/2, imgPng. Height );
Bitmap
ClipPng = new
Bitmap (imgPng). Clone (rect, imgPng. PixelFormat );
From Bychentufeiyang's column