Page 1 of 1
Performance of MagickGetImageDepth ... huh?
Posted: 2008-04-02T12:08:39-07:00
by paraplegic
I posted earlier about a 6.3.9 performance regression, and I think I've tracked the glitch down to MagickGetImageDepth, which seems to take quite a while to execute, at least compared to MagickGetImageHeight/Width. Has anyone noticed a problem with this? I'm running the latest stable 6.4.0,3 from svn on FreeBSD 6.3-R using gcc. Is this a problem, or does the algorithm to determine depth take some gyrations which I hadn't expected (eg: return the Quantum size??).
Re: Performance of MagickGetImageDepth ... huh?
Posted: 2008-04-02T13:19:51-07:00
by magick
MagickGetImageDepth() inspects each pixel of the image to determine its actual bit depth. It is optimized to return quickly if the image is colormapped or if the depth matches the quantum depth (e.g. a 16-bit image and a Q16 version of ImageMagick). At some point we discussed adding a new method that just returns the image->depth member but have not implemented it just yet.
Re: Performance of MagickGetImageDepth ... huh?
Posted: 2008-04-02T17:33:08-07:00
by paraplegic
magick wrote:MagickGetImageDepth() inspects each pixel of the image to determine its actual bit depth. It is optimized to return quickly if the image is colormapped or if the depth matches the quantum depth (e.g. a 16-bit image and a Q16 version of ImageMagick). At some point we discussed adding a new method that just returns the image->depth member but have not implemented it just yet.
I will code some sort of work around ... thanks very much for the explanation, it is much appreciated.
Cheers,
Rob.