请问以下 C# 代码的 VB.net 等价物是什么:
internal static unsafe void DistortedDraw(byte* sourceBuffer, Bitmap displacementMap, Bitmap destBitmap) {
int sourceWidth = destBitmap.Width, sourceHeight = destBitmap.Height;
BitmapData previewData = destBitmap.LockBits(new Rectangle(0, 0, sourceWidth, sourceHeight), ImageLockMode.WriteOnly, destBitmap.PixelFormat);
int sourceDataStride = previewData.Stride;
int sourceBPP = destBitmap.PixelFormat.ToString().Contains("16") ? 2 : destBitmap.PixelFormat.ToString().Contains("24") ? 3 : destBitmap.PixelFormat.ToString().Contains("32") ? 4 : 0;
if (displacementMap == null) {
unsafe {
byte* previewScan0 = (byte*)previewData.Scan0;
byte* sourceScan0 = (byte*)sourceBuffer;
for (int y = 0, yofs = 0, invyofs = (sourceHeight - 1 - y) * sourceDataStride; y < sourceHeight; y++, yofs += sourceDataStride, invyofs -= sourceDataStride) {
for (int x = 0; x < sourceDataStride; x += 4) {
*(int*)(previewScan0 + yofs + x) = *(int*)(sourceScan0 + invyofs + x);
}
}
}
}
destBitmap.UnlockBits(previewData);
}
谢谢。