how to know if you are on a Q8 or Q16 version of ImageMagick

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
xt5

how to know if you are on a Q8 or Q16 version of ImageMagick

Post by xt5 »

hi,

I want to know an easy way to know if the version that call a custom filter (dynamic module) is a Q8 or Q16 version of ImageMagick, that way I could make a module compatible with both versions (I'm using MagickCore).

If it its not posible to know it in runtime, is there a way (a macro or so) to know it easily on compile time?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to know if you are on a Q8 or Q16 version of ImageMa

Post by fmw42 »

The only way I know is to find its directory. For example on my system, I built a custom filter using MagickFilterKit-1.0.0

I can find where it gets stored as:

/usr/local/lib/ImageMagick-6.6.3/modules-Q16/filters


So the directory says which Q version it is.

That is the best I can offer until Magick or someone else who knows more can answer
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: how to know if you are on a Q8 or Q16 version of ImageMa

Post by el_supremo »

Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to know if you are on a Q8 or Q16 version of ImageMa

Post by fmw42 »

I also forgot to mention the recent addition of

convert -list module

at least for command line mode. It lists all the coders and filters.

From the changelog

2010-06-28 6.6.2-10 Cristy <quetzlzacatenango@image...>
The -list module option lists image coders and image filters.


I presume if you are on Q8 and there are only Q16 filters, that you will not see any filters listed. But I have not tested that.
xt5

Re: how to know if you are on a Q8 or Q16 version of ImageMa

Post by xt5 »

thanks Pete, this what I was after for.

also thanks fmw42 for the workarounds!
Post Reply