Page 1 of 1

How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-29T11:23:47-07:00
by rmagick
Is there any clever way to determine programmatically if ImageMagick has been built with --enable-hdri? I'd like to check for this configuration from RMagick's configuration script. I understand I could just run configure -version and scan the output, but I'm wondering if there's some other test I could use.

Re: How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-29T14:02:14-07:00
by magick
To determine if the ImageMagick version is HDRI use GetMagickVersion() and search for HDRI in the returned version string. You could also try
  • Quantum p = 0.5;
    If (p != 0.5) puts("ImageMagick is HDRI enabled.");
We could add a convenience method for you such as IsMagickHDRIEnabled() is you prefer.

Re: How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-30T16:17:51-07:00
by rmagick
Thanks for the offer, but what I'm wondering about is a way to determine if ImageMagick was configured with --enable-hdri from my configuration script, so I can configure RMagick similarly. Something similar to the Magick-config command, for example.

Like I said, I can always just look at the output from convert -version, but I don't want to overlook a better solution.

Re: How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-30T16:57:44-07:00
by magick
We could extent 'Magick-config' to return '6.3.5 Q16 HDRI' for the --version option. Would that work for you? Or can you suggest a better method?

Re: How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-30T17:06:18-07:00
by rmagick
That would be perfect. Thank you very much!

Re: How can I tell if ImageMagick has been built with --enable-h

Posted: 2007-07-30T17:56:13-07:00
by magick
The patch is in ImageMagick 6.3.5-5 Beta available sometime tomorrow.