我有这个代码:
BitmapSource.Create(pixelWidth, pixelHeight,
dpiX, dpiY, image.Format, image.Palette,
_modifiedRgb, stride);
这是抛出一个
ArgumentException - The buffer size is not enough.
请问有什么想法吗?
最佳答案
这意味着您的 _modifiedRgb
不够大。
它需要包含 Height * Stride * Format.BitsPerPixel/8
字节。
关于c# - BitmapSource.Create 错误 - 缓冲区大小不够大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8492563/