Open Monsok opened 8 years ago
I can't see a mistake in your code, however there is a known bug on GPU rendering that sometimes results itself in an error message like this. Can you try setting the RenderOptions on your renderer to CPUOnly as a test if that fixes the problem?
(In the code above it would be bitmapRenderer.RenderOptions = RenderOptions.CPUOnly right after constructing it.)
Yes RenderOptions.CPU seems to fix the error.
I am trying to blend an existing image with another
IImageProvider
that has anEffect
applied. I noticed there are are severalEffect
s that throw InvalidArgumentException such as theAuto Enhance
andAuto Levels
. Many otherEffect
s such as theAntique
effect does not throw this error.My code:
The error is raised at
Bitmap bitmap = await bitmapRenderer.RenderAsync();
Perhaps I need to set some parameters like imagesize or something but I can't figure out what I am missing from the error message. Any ideas?