Form1.cs 732 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Bowin.Common.Drawing;
  10. namespace Bowin.Common.Test
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. private void Form1_Load(object sender, EventArgs e)
  19. {
  20. Image imageSource = Image.FromFile(@"d:\img_0423.jpg");
  21. Image imageOverlay = Image.FromFile(@"d:\code.png");
  22. var imageResult = PictureHelper.AddOverlay(imageSource, imageOverlay, 200, 400);
  23. imageResult.Save(@"d:\result.jpg");
  24. }
  25. }
  26. }