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

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
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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?
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

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

Post by rmagick »

That would be perfect. Thank you very much!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

The patch is in ImageMagick 6.3.5-5 Beta available sometime tomorrow.
Post Reply