R
Ringo
I'm new to C# and want a simple app to display a bitmap that is in
bayer format. I searched the group and have an app that can draw pixels
in a picturebox using Pset. My problem is that Pset uses x,y,color,
where color is predefined. I need to draw my pixel based on the value
in my file. So if I get a value for a blue pixel of 50, how do I make
that a darker blue than a value of 100? I know Pset is probably not the
best way to do it, but I'm a newbie and it is easy to use.
Here is my code so far;
for (y = 0; y < 144; y++)
{
for (x = 0; x < 176; x+=4)
{
ByrArray[x, y] = br.ReadByte();
picture.SetPixel(x, y, Color.Red);
picture.SetPixel(x+1, y, Color.Green);
picture.SetPixel(x+2, y, Color.Blue);
picture.SetPixel(x+3, y, Color.Green);
}
}
is there a way to scale the colors?
Thanks
Ringo
bayer format. I searched the group and have an app that can draw pixels
in a picturebox using Pset. My problem is that Pset uses x,y,color,
where color is predefined. I need to draw my pixel based on the value
in my file. So if I get a value for a blue pixel of 50, how do I make
that a darker blue than a value of 100? I know Pset is probably not the
best way to do it, but I'm a newbie and it is easy to use.
Here is my code so far;
for (y = 0; y < 144; y++)
{
for (x = 0; x < 176; x+=4)
{
ByrArray[x, y] = br.ReadByte();
picture.SetPixel(x, y, Color.Red);
picture.SetPixel(x+1, y, Color.Green);
picture.SetPixel(x+2, y, Color.Blue);
picture.SetPixel(x+3, y, Color.Green);
}
}
is there a way to scale the colors?
Thanks
Ringo