I want to convert a grayscale bitmap to a color bitmap without using a color diagram.
I'm facing the problem of convert "IrrlichtLime.Video.ColorHSL" to "system.drawing.color"
Here is part of my code ...
Code: Select all
private void button2_Click(object sender, EventArgs e)
{
Bitmap bmp = (Bitmap)pictureBox1.Image;
int NumRow = pictureBox1.Height;
int numCol = pictureBox1.Width;
Bitmap color = new Bitmap(pictureBox1.Width, pictureBox1.Height);// COLOR is the resultant matrix
for (int i = 0; i < NumRow; i++)
{
for (int j = 0; j < numCol; j++)
{
System.Drawing.Color need = bmp.GetPixel(j, i);
int use = need.R;
IrrlichtLime.Video.ColorHSL clr = new IrrlichtLime.Video.ColorHSL(use,255,127);
color.SetPixel(j, i, clr); //error appears cannot convert 'Irrlicht.video.colorHSL' to 'system.drawing.color'
}
}
pictureBox1.Image = color;
}