BitmapSource.Create错误-缓冲区大小不足 [英] BitmapSource.Create error - Buffer size is not large enough
本文介绍了BitmapSource.Create错误-缓冲区大小不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有此代码:
BitmapSource.Create(pixelWidth, pixelHeight,
dpiX, dpiY, image.Format, image.Palette,
_modifiedRgb, stride);
这是抛出
ArgumentException-缓冲区大小不足.
请问有什么想法吗?
推荐答案
这意味着您的 _modifiedRgb
不够大.
它需要包含 Height * Stride * Format.BitsPerPixel/8
字节.
That would mean that your _modifiedRgb
isn't big enough.
It needs to contain Height * Stride * Format.BitsPerPixel/8
bytes.
这篇关于BitmapSource.Create错误-缓冲区大小不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文