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: There is a class called OpenCL that has a static property called IsEnabled? This does require the latest version of Maick.NET. It is also possible that you can use OpenCL when you upgrade to the latest version.
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: There is a class called OpenCL that has a static property called IsEnabled? This does require the latest version of Maick.NET. It is also possible that you can use OpenCL when you upgrade to the latest version.