Reputation: 8506
I have this code:
BitmapSource.Create(pixelWidth, pixelHeight,
dpiX, dpiY, image.Format, image.Palette,
_modifiedRgb, stride);
This is throwing an
ArgumentException - The buffer size is not enough.
Any ideas please?
Upvotes: 2
Views: 4135
Reputation: 887385
That would mean that your _modifiedRgb
isn't big enough.
It needs to contain Height * Stride * Format.BitsPerPixel/8
bytes.
Upvotes: 4