예제 #1
0
파일: Form1.cs 프로젝트: cocos56/CS
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="path"></param>
        public void Flow(string path, bool disorder)
        {
            InitRandomPictureBox();
            Image bm = CutPicture.Resize(path, 600, 600);

            CutPicture.BitMapList = new List <Bitmap>();
            for (int y = 0; y < 600; y += SideLength)
            {
                for (int x = 0; x < 600; x += SideLength)
                {
                    Bitmap temp = CutPicture.Cut(bm, x, y, SideLength, SideLength);
                    CutPicture.BitMapList.Add(temp);
                }
            }
            ImportBitMap(disorder);
        }
예제 #2
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="path"></param>
        public void Flow(string path)
        {
            Image bm = CutPicture.Resize(path, 300, 300);

            CutPicture.BitMapList = new List <Bitmap>();
            for (int y = 0; y < 300; y += 100)
            {
                for (int x = 0; x < 300; x += 100)
                {
                    //string key = x + "-" + y;
                    Bitmap temp = CutPicture.Cut(bm, x, y, 100, 100);
                    //pictureLocationDict.Add(key, temp);
                    CutPicture.BitMapList.Add(temp);
                }
            }
            ImportBitMap();
        }