How to convert from ‘Magick::Image’ to ‘MagickLib::MagickWan

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
carllos

How to convert from ‘Magick::Image’ to ‘MagickLib::MagickWan

Post by carllos »

Hi,

I'm starting to develop in C++ using Magick++, but frequently run across methods that are not implemented in Magick++ as well as in the C interface. Is there any way to convert 'on the go' from the ‘Magick::Image’ to ‘MagickLib::MagickWand’ and vice versa?

I know, that I could just write program using the C api, but Magick++ is very handy with the STL support and I would hate to lose that. I will be very grateful for a hint how to get past this problem.

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

Re: How to convert from ‘Magick::Image’ to ‘MagickLib::MagickWan

Post by magick »

You can access any C interface simply by prefixing the method name with MagickLib:: (e.g. MagickLib::ResizeImage()).
carllos

Re: How to convert from ‘Magick::Image’ to ‘MagickLib::MagickWan

Post by carllos »

I am aware of that. I was just wandering is there a way to use Magick++ methods on a MagickWand or MagickWand functions on a Magick::Image (o simple conversion on the fly, direct casts do not work).

But I got past this problem by rewriting the code to C, a little troublesome, but got a chance to see if I still remember how to use some very basic stuff 8)

Even so, if you may, please answer the question, it may be useful for the future.

Karol

PS. ImageMagick is truly great :D
Post Reply