|
|
请教一个问题,按照下面的代码将图片输入到AnyChat,为何图片是倒过来的?
Bitmap bmp = frame;
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
System.Drawing.Imaging.BitmapData bmpData = bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, bmp.PixelFormat);
//Get the address of the first line.
IntPtr ptr = bmpData.Scan0;
int size = bmpData.Width * bmpData.Height * 3;
bmp.UnlockBits(bmpData);
AnyChatCoreSDK.InputVideoData(ptr, size, 0);
|
|