Get pixel length from PixelFormat
问题 How can i get pixel length (in bytes) from PixelFormat enumeration? I want to process image pixels using native approach, but how can i iterate through an image if i don't know pixel's offset. Code: let formRgbCube (image : Bitmap) = let width = image.Width let height = image.Height let bitmapData = image.LockBits(Rectangle(0, 0, image.Width, image.Height), ImageLockMode.ReadOnly, image.PixelFormat) let ptr = NativePtr.ofNativeInt<byte>(bitmapData.Scan0) let stride = bitmapData.Stride let