我想不使用位图对象来更改图像的颜色。.我要从此图像的数组字节中进行更改。
public byte[] changeTableColor(byte[] data, int start, int change)
{
byte[] newImageByteArray = new byte[data.Length];
for (int i = 0; i < start; i++)`enter code here`
{
newImageByteArray[i] = data[i];
}
for (int i = start; i < data.Length; i++)
{
Color c = Color.FromArgb(data[i]);
Color color = Color.FromArgb(c.A + change, c.R, c.G, c.B);
newImageByteArray[i] = (byte)color.ToArgb();
}
return newImageByteArray;
}
newImageByteArray返回了,Aarry却为图像添加了新颜色...该怎么办?