zoukankan      html  css  js  c++  java
  • 获取一张图片的字节数组及字节数组的合并

          public Byte[] Tupian() 获取一张图片的字节数组
            {
                FileStream fs = new FileStream(@"G:smartrtinDebugData pl111.jpg", FileMode.Open);
                int filelength = 0;
                filelength=(int) fs.Length; //获得文件长度
                Byte[] fl = new Byte[filelength]; //建立一个字节数组
                fs.Read(fl, 0, filelength); //按字节流读取
                fs.Close();
                return fl;
            }
            public static byte[] copybyte(byte[] a, byte[] b)字节数组的合并
            {
                byte[] c = new byte[a.Length + b.Length];
                a.CopyTo(c, 0);
                b.CopyTo(c, a.Length);
                return c;
            }

  • 相关阅读:
    PHP入门
    requests中text,content,json之间的区别
    有关pip报错的问题

    pycharm操作
    python selenium 相关操作
    python tkinter菜单
    初识Go
    Python _easygui详细版
    easygui _1
  • 原文地址:https://www.cnblogs.com/zhangruisoldier/p/4577313.html
Copyright © 2011-2022 走看看