Esempio n. 1
0
        /// <summary>
        /// BitMap
        /// </summary>
        /// <returns></returns>
        public Bitmap MakeHeatMap()
        {
            var result = new Bitmap(this.Width, this.Height, PixelFormat.Format32bppArgb);

            this.GrayMap = this.makeGrayMap();

            for (int x = 0; x < this.Width; x++)
            {
                for (int y = 0; y < this.Height; y++)
                {
                    var grayVal = this.GrayMap.GetPixel(x, y);
                    var index   = grayVal.A;
                    var color   = ColorUtil.GetColorInRamp(index, this.ColorRamp);
                    result.SetPixel(x, y, color);

                    //Debug.WriteLine(index);
                }
            }

            return(ColorUtil.AdjustOpacity(result, this.Opacity));
        }