C#控制台下生成EAN13图片N张[含class]
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; namespace EAN13 { class Program { static void Main(string[] args) { int h = 15; int w = 4; Bitmap img = new Bitmap(w * 130, h * 60); //pictureBox1.Image = (Image)img; Graphics g = Graphics.FromImage(img); g.FillRectangle(Brushes.White, 0, 0, w * 130, h * 60); Pen p = new Pen(Color.White, 0); Random rd = new Random(); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { long v1 = rd.Next(100000, 999999); //只限于:十二位十进制数; long v2 = rd