I have been using Magick.net verion 6 for years.
the distort command in the code below is taken about 38 ms. on the same environment with version 7 it takes 200 to 240 ms. Did I do something wrong? do I need to change something in new version?
I use q8-Any-cpu
for test you can create a console application and use this code and switch between magick.net 6 and 7. if you use any image you can see the difference in the speed.
the distort command in the code below is taken about 38 ms. on the same environment with version 7 it takes 200 to 240 ms. Did I do something wrong? do I need to change something in new version?
I use q8-Any-cpu
for test you can create a console application and use this code and switch between magick.net 6 and 7. if you use any image you can see the difference in the speed.
class Program
{
static void Main(string[] args)
{
MagickReadSettings readSettings = new MagickReadSettings();
readSettings.Format = MagickFormat.Bmp;
readSettings.Width = 590;
readSettings.Height = 590;
var image = new MagickImage(@"d:\temp\mypic.bmp", readSettings);
double[] defaultcoordinate =
{
0,
0,
43.78,
195.26,
590,
0,
405.97,
203.69,
590,
590,
405.97,
620.90,
0,
590,
113.78,
488.85
};
var coordinates = defaultcoordinate;
var distortImageMethod = DistortMethod.Perspective;
image.VirtualPixelMethod = VirtualPixelMethod.White;
image.Distort(distortImageMethod, coordinates);
image.Dispose();
}
I have found a clue: even in the first versions of 7 - from version 7.0.0.1 to 7.0.0.22 - the process time of the distort with that image is around 40 ms to 70 ms and suddenly from version 7.0.0.104 it jumps to 194 - 200 ms.