private void FromImageImage(PaintEventArgs e)
 {
 
     // Create image.
     Image imageFile = Image.FromFile("SampImag.jpg");
 
     // Create graphics object for alteration.
     Graphics newGraphics = Graphics.FromImage(imageFile);
 
     // Alter image.
     newGraphics.FillRectangle(new SolidBrush(Color.Black), 100, 50, 100, 100);
 
     // Draw image to screen.
     e.Graphics.DrawImage(imageFile, new PointF(0.0F, 0.0F));
 
     // Dispose of graphics object.
     newGraphics.Dispose();
 }
 
  
相关新闻
- 小程序登录流程图理解 2020-08-18
- 在C#中获取web.config中的配置信息 2021-08-23
- 小程序open-data头像样式 2021-04-10
- 小程序rich-text 富文本解析图片过大和图片路径的问题 2020-11-25
- C#中去掉字符串的最后一个字符 2020-11-23
 
                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                
 
                        
                    
