Problems with functions ResetImagePropertyIterator() and GetNextImageProperty()

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
jsanterre
Posts: 31
Joined: 2014-05-09T10:39:21-07:00
Authentication code: 6789

Problems with functions ResetImagePropertyIterator() and GetNextImageProperty()

Post by jsanterre » 2015-06-18T14:54:32-07:00

Hi,

I'm trying to use the two functions ResetImagePropertyIterator() and GetNextImageProperty() (that can be found in include/magick/property.h). I'm using VisualStudio and I have:

Code: Select all

#include <Magick++.h> 
#include <magick/property.h>
at the top of my file.

First, I tried:

Code: Select all

ResetImagePropertyIterator( image );
and I got: "error C3861: 'ResetImagePropertyIterator': identifier not found"

Then I tried:

Code: Select all

MagickExport::ResetImagePropertyIterator( image );
and I got: "error C2039: 'ResetImagePropertyIterator' : is not a member of '`global namespace'' even if the function was present in the auto-completion list.

Note that I'm already using things like:

Code: Select all

Magick::Image image;
image.read( filename );

and everything is working fine so my include paths should be okay.

I suppose there's something simple I'm missing here... Do you have an idea what it is?

I found that post: viewtopic.php?t=21469 that shows the exact same problem as mine, but that post never got an answer...

Many thanks!

Julie

jsanterre
Posts: 31
Joined: 2014-05-09T10:39:21-07:00
Authentication code: 6789

Re: Problems with functions ResetImagePropertyIterator() and GetNextImageProperty()

Post by jsanterre » 2015-06-19T08:49:32-07:00

Hi,

I figured I was using the wrong namespace. The following is compiling:

Code: Select all

const MagickCore::Image* image;
MagickCore::ResetImagePropertyIterator( image );
Now I would need to call the function with the image parameter being a Magick:Image instead of a MagickCore::Image.

Thanks in advance for any advice you could gave.

Julie

jsanterre
Posts: 31
Joined: 2014-05-09T10:39:21-07:00
Authentication code: 6789

Re: Problems with functions ResetImagePropertyIterator() and GetNextImageProperty()

Post by jsanterre » 2015-06-19T09:32:51-07:00

Hi again,

Since I'm suspecting that those two images (Magick::Image and MagickCore::Image) are two different things and that it's probably impossible to call ResetImagePropertyIterator() on a Magick::Image, here's another question...

Is it possible, using Magick++, to iterate through or to get a list of all the Magick::Image attributes? I know it's possible to set/get a particular attribute, but I would need to gather them all.

Thank you!

Julie

jsanterre
Posts: 31
Joined: 2014-05-09T10:39:21-07:00
Authentication code: 6789

Re: Problems with functions ResetImagePropertyIterator() and GetNextImageProperty()

Post by jsanterre » 2015-07-02T09:03:15-07:00

For the sake of others that would need to do the same...

I was able to iterate through the list of all attributes of a Magick::Image using:

Code: Select all

const MagickCore::Image* MagickCoreImage = MagickImage.constImage();

Then, as I initially wanted, I was able to use the two functions ResetImagePropertyIterator() and GetNextImageProperty() on the MagickCoreImage.

Hope this will help others...

Julie

Post Reply