AddProfile very slow from version 7.2.0.0

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
zomeo
Posts: 10
Joined: 2018-04-02T02:27:59-07:00
Authentication code: 1152

AddProfile very slow from version 7.2.0.0

Post by zomeo »

Hi everyone,

from version 7.2.0.0 the AddProfile method, using a device link icc profile, is very slow.
My simple code is:

Code: Select all

using(MagickImage mi = new MagickImage(@"E:\IN.tif"))
{
    mi.AddProfile(new ColorProfile(@"E:\DeviceLink.icc"));
    mi.Write(@"E:\OUT.tif");
}
You can find the IN.tif (CMYK 600 dpi LZW TIFF) file here:
https://www.dropbox.com/s/57k8knyiwmp98xb/IN.tif?dl=0
and the device link (CMYK to CMYK) here:
https://www.dropbox.com/s/50t726x0scxqj ... k.icc?dl=0

Until version 7.1.0.0 the AddProfile method using .NET 4 x64 took about 1 second.
From version 7.2.0.0 it takes about 8,3 seconds (I've already tried the latest version).

The difference is huge.

I also read the change log but I've not found anything related.

Am I doing something worng or should I modify something in my code to restore the previous performance?

Thank you very much

Denis
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: AddProfile very slow from version 7.2.0.0

Post by dlemstra »

What changed between those versions is support for HDRI color profile management. Wondering if that slowed it down. Will need to investigate this.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
zomeo
Posts: 10
Joined: 2018-04-02T02:27:59-07:00
Authentication code: 1152

Re: AddProfile very slow from version 7.2.0.0

Post by zomeo »

Ok, thank you very much.

Regards,

Denis
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: AddProfile very slow from version 7.2.0.0

Post by dlemstra »

It does look like this slow down was causing by adding support for HDRI color profile management. Will need to think of a way to fix this. Will get back to you when I have more info.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
zomeo
Posts: 10
Joined: 2018-04-02T02:27:59-07:00
Authentication code: 1152

Re: AddProfile very slow from version 7.2.0.0

Post by zomeo »

I understand. Thank you for your update.
zomeo
Posts: 10
Joined: 2018-04-02T02:27:59-07:00
Authentication code: 1152

Re: AddProfile very slow from version 7.2.0.0

Post by zomeo »

Hello Dirk,

have you found any solution to process color image conversion without HDRI color profile management?

Thank you and best regards,

Denis
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: AddProfile very slow from version 7.2.0.0

Post by dlemstra »

Sorry for no getting back to this topic. This should be resolved in the latest release. Or are you using the HDRI build of Magick.NET?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
zomeo
Posts: 10
Joined: 2018-04-02T02:27:59-07:00
Authentication code: 1152

Re: AddProfile very slow from version 7.2.0.0

Post by zomeo »

Ok thank you very much.
Actually I'm not using the HDRI Version but I was waiting to this fix for upgrading to the latest version of the library in my projects.
Post Reply