示例#1
0
        /// <summary>
        /// converts this image to an instance of Hawkynt cImage
        /// </summary>
        public cImage tocImage()
        {
            cImage image = new cImage(this.width, this.height);

            int y;
            int x;

            for (x = 0; x < this.width; x++)
            {
                for (y = 0; y < this.height; y++)
                {
                    image.SetPixel(x, y, new sPixel(this.r[x * height + y], this.g[x * height + y], this.b[x * height + y], this.a[x * height + y]));
                }
            }

            return(image);
        }