Hi,
I am trying to resize an image. Below is my code. It takes huge time and crashes my display driver.
Let me know how to fix the problem.
Thanks
```
private static void ConvertImgUsingMagickDotnet(string sourceImg, string targetImg)
{
MagickReadSettings settings = new MagickReadSettings();
// Settings the density to 600 dpi will create an image with a better quality
settings.Density = new Density(600);
// Read first frame of gif image
using (MagickImage image = new MagickImage(sourceImg, settings))
{
//When zero is specified for the height, the height will be calculated with the aspect ratio.
image.Resize(479, 0);
// Save frame as jpg
image.Write(targetImg);
}
}
```
Comments: The problem is most likely an OpenCL issue. I cannot reproduce it on my machine so this might be a driver issue. Setting OpenCL.IsEnabled to false should solve your issue.
I am trying to resize an image. Below is my code. It takes huge time and crashes my display driver.
Let me know how to fix the problem.
Thanks
```
private static void ConvertImgUsingMagickDotnet(string sourceImg, string targetImg)
{
MagickReadSettings settings = new MagickReadSettings();
// Settings the density to 600 dpi will create an image with a better quality
settings.Density = new Density(600);
// Read first frame of gif image
using (MagickImage image = new MagickImage(sourceImg, settings))
{
//When zero is specified for the height, the height will be calculated with the aspect ratio.
image.Resize(479, 0);
// Save frame as jpg
image.Write(targetImg);
}
}
```
Comments: The problem is most likely an OpenCL issue. I cannot reproduce it on my machine so this might be a driver issue. Setting OpenCL.IsEnabled to false should solve your issue.