Esempio n. 1
0
        private List <List <Bitmap> > CutColumn(int index)
        {
            double columnXOffset = index * columnDist + xOffset;

            List <List <Bitmap> > images = new List <List <Bitmap> >();

            for (int i = 0; i < rowCount; i++)
            {
                images.Add(new List <Bitmap>());
            }

            int w = (int)(form.Width * cellWidth);
            int h = (int)(form.Width * cellWidth);

            for (int j = 0; j < rowCount; j++)
            {
                for (int i = 0; i < sampleCount; i++)
                {
                    int x = (int)((cellWidth * i + columnXOffset) * form.Width);
                    int y = (int)((cellHeight * j + yOffset) * form.Height);
                    images[j].Add(BitmapUtils.CutOutPiece(form, x, y, w, h));
                }
            }
            return(images);
        }