Hello, I am currently trying to resize the image but my .NET Console Application crashes as soon as it tries to resize. The bytes from the image are fine, because without the Resize() it shows up in the image.
Calling the own Watermark method
Watermark(teamAImage, 330, 330, image, 530, 530);
Method where I try to resize the image
private static void Watermark(byte[] bytes, int xPosition, int yPosition, IMagickImage image, int? width = null, int? height = null)
{
using (var watermark = new MagickImage(bytes))
{
if (width != null && height != null)
{
watermark.Resize((int)width, (int)height);
}
watermark.Format = MagickFormat.Png;
image.Composite(watermark, xPosition, yPosition, CompositeOperator.Over);
}
}
The program '[23516] dotnet.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.
The program '[23516] dotnet.exe: Program Trace' has exited with code 0 (0x0).
I suspect you are getting this exception because of a video card driver issue. What kind of video card do you have and is your issues resolved when you upgrade the driver for it? If the problem persists you can disable GPU acceleration with OpenCL.IsEnabled=false.
I've got the NVIDIA GeForce GTX 760 and it's already up to date.
The problem is solved now with your idea OpenCL.IsEnabled=false.
Thank you very much!
Most helpful comment
I suspect you are getting this exception because of a video card driver issue. What kind of video card do you have and is your issues resolved when you upgrade the driver for it? If the problem persists you can disable GPU acceleration with
OpenCL.IsEnabled=false.