日期:2014-05-17 浏览次数:20741 次
'ABitmap位图结构体的指针,picHook是个pictureBox
Dim bmp As BITMAP
Dim pts As Long
CopyMemory VarPtr(bmp), ABitmap, Len(bmp)
With picHook
.Cls
.Width = bmp.bmWidth
.Height = bmp.bmHeight
.Image , bmp.bmWidthBytes * bmp.bmHeight, ByVal bmp.bmBits
.PaintPicture Me.Icon, 10, 10
.CurrentX = 20
.CurrentY = 20
picHook.Print "Time Stamp: " & Format(LongLongToDouble(APTSLow, APTSHigh), "0.000000")
GetBitmapBits .Image, bmp.bmWidthBytes * bmp.bmHeight, ByVal bmp.bmBits
End With
Bitmap source=new Bitmap("图片路径");
Graphics surface=Graphics.FromImage(source);
surface.DrawString("Time Stamp:.....",new Font("宋体",12f),Brushs.Red,new PointF(20,20));
source.Save("新图路径");
surface.Dispose();
source.Dispose();