question about -monitor

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

question about -monitor

Post by fmw42 »

I have been using -monitor to report the progress in scripts that especially use -fx. I notice that the progress readout seems to progress exponentially rather than linearly. For example it might read 0%, 3%, 6%, 12%, 25%, 50%, 100%.

Is this intended?

Would it be possible to make the readout more linear?

Currently I using IM 6.3.8-11
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: question about -monitor

Post by magick »

The progress monitor is behaving as it was designed-- to mark process on powers of two boundaries or a maximum of every 128 scanlines. If you have a better way post your patches to QuantumTick() here:

Code: Select all

static inline MagickBooleanType QuantumTick(const MagickOffsetType offset,
  const MagickSizeType span)
{
  if ((offset & (offset-1)) == 0)
    return(MagickTrue);
  if ((offset & 0x7f) == 0)
    return(MagickTrue);
  if (offset == (MagickOffsetType) (span-1))
    return(MagickTrue);
  return(MagickFalse);
}
Post Reply