[We'll look to improve algo, time permitting -Magick] [workaround: -evaluate Log] count colors takes 13 times longer
Posted: 2017-07-23T14:16:12-07:00
In some cases it takes an extremely long time (over 3 minutes) to calculate the number of unique colors for a very small (512x768) hdri image, while in other cases of just a slightly different version of the image, it takes "just" 15 seconds.
In this case it takes "just" 15 seconds:
time magick www.pauldebevec.com_Research_HDR_memorial.hdr -evaluate Multiply 0.5 -format '%k\n' -identify null:
265903
real 0m15.526s
user 0m0.092s
sys 0m0.061s
But in this case it takes over 3 minutes:
time magick www.pauldebevec.com_Research_HDR_memorial.hdr -evaluate Multiply 0.0625 -format '%k\n' -identify null:
265903
real 3m16.052s
user 0m0.046s
sys 0m0.108s
You can obtain this famous hdri file as from www.pauldebevec.com/Research/HDR/memorial.hdr
I am running the Windows binary under Windows 7. I happen to be invoking it from the cygwin command line.
magick -version
Version: ImageMagick 7.0.6-2 Q16 x64 2017-07-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
In this case it takes "just" 15 seconds:
time magick www.pauldebevec.com_Research_HDR_memorial.hdr -evaluate Multiply 0.5 -format '%k\n' -identify null:
265903
real 0m15.526s
user 0m0.092s
sys 0m0.061s
But in this case it takes over 3 minutes:
time magick www.pauldebevec.com_Research_HDR_memorial.hdr -evaluate Multiply 0.0625 -format '%k\n' -identify null:
265903
real 3m16.052s
user 0m0.046s
sys 0m0.108s
You can obtain this famous hdri file as from www.pauldebevec.com/Research/HDR/memorial.hdr
I am running the Windows binary under Windows 7. I happen to be invoking it from the cygwin command line.
magick -version
Version: ImageMagick 7.0.6-2 Q16 x64 2017-07-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib