0
for (myBitmap.col = 0; myBitmap.col < myBitmap.Height; myBitmap.col++)
{
for (myBitmap.row = 0; myBitmap.row < myBitmap.Height; myBitmap.row++)
{
myBitmap.data[myBitmap.row * (int)myBitmap.ScanLineWidth + myBitmap.col + myBitmap.offset] += 5;
}
}
MemoryStream ms = new MemoryStream(myBitmap.data);
pictureBox1.Image = Image.FromStream(ms);
//pictureBox1.Image = new Bitmap(returnimage);
MessageBox.Show("The image brightness conversion is successful");
我正面臨着將內存流對象轉換爲圖像的問題。錯誤出現無效參數的將數據流轉換爲數組的問題
可能會有所幫助http://stackoverflow.com/questions/1196258/convert-bitmap-to-image –
是什麼myBitmap.data?它是字節數組嗎? –