- Код: Выделить всё
Dim initImage As Bitmap
initImage = New Bitmap(800, 800)
For i = 0 To 799
For j = 0 To 799
colorP = data(i,j) 'массив с данными цветов
initImage.SetPixel(i, j, Color.FromArgb(colorP, colorP, colorP))
Next j
Next i
'...
Dim Gr As Graphics = Graphics.FromImage(initImage)
'...
Gr.Clear(Color.White)
ulCorner = New Point(0, 0)
Gr.DrawImage(initImage, ulCorner)
Gr.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAliasGridFit
Gr.DrawLine(Pens.Black, imageOffset - 1, 10, imageOffset - 1, (newHeight - 1) + 10) 'Ось слева
Gr.DrawLine(Pens.Black, imageOffset - 1 + pings, 10, imageOffset - 1 + pings, (newHeight - 1) + 10) 'Ось справа
'....
drawFont = New Font("Arial", 10, FontStyle.Regular)
drawBrush = New SolidBrush(Color.Black)
format1 = New StringFormat
format1.Alignment = StringAlignment.Far
Gr.DrawString("бла-бла-бла", drawFont, drawBrush, 10, 10, format1)
'....
initImage.Save("C:\1.bmp", Imaging.ImageFormat.Bmp)
Как сделать тоже самое, только через DIB?