Making ImageMagick revision number easily accessable

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Making ImageMagick revision number easily accessable

Post by mkoppanen »

Currently the only place where I found the revision number is #define MagickLibVersionNumber. It would be nice to have the full version with the revision (6.3.5-9) in an integer form.
Mikko Koppanen
My blog: http://valokuva.org
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Making ImageMagick revision number easily accessable

Post by magick »

Did you look at MagickGetVersion()? It returns the version number.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Making ImageMagick revision number easily accessable

Post by el_supremo »

MagickGetVersion()? It returns the version number.
But the revision number is contained in this #define:

Code: Select all

#define MagickLibVersionNumber  6,3,5,9
and there are no references to it anywhere in the IM code so there's no way to get at it with MagickWand.

Pete
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Making ImageMagick revision number easily accessable

Post by magick »

You want the minor revision number then-- 6.3.5-9 rather than 6.3.5 which is returned by MagickGetVersion(). That information is not readily available now other than to use the MagickLibVersionNumber define.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Making ImageMagick revision number easily accessable

Post by mkoppanen »

magick wrote:You want the minor revision number then-- 6.3.5-9 rather than 6.3.5 which is returned by MagickGetVersion(). That information is not readily available now other than to use the MagickLibVersionNumber define.
Yes, I noticed the same thing. Thats why I asked for an easy way to get -9 part. Using the MagickLibVersionNumber with macros led me to macro hackery which eventually didnt compile on VC.

I would like to support all new features in Imagick as soon as they appear and currently I got AC_TRY_COMPILE in config.m4. In a long run that might not be optimal since I will propably need those checks in future versions also and that would fill the config.m4 with AC_TRY_COMPILE and AC_TRY_RUN tests.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply