Problem with STL annotateImage()

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
CoolSpot

Problem with STL annotateImage()

Post by CoolSpot »

Hi all!

This simple code does not work:

Code: Select all

for_each(imageList.begin(),imageList.end(),annotateImage("test", Geometry(10,10)));
My g++ compiler says:
line.cpp: In member function `void Line::RenderLine()':
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
line.cpp:232: error: within this context
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
line.cpp:232: error: within this context
line.cpp:232: error: initializing argument 3 of `_Function std::for_each(_InputIterator, _InputIterator, _Function) [with _InputIterator = std::_List_iterator<Magick::Image>, _Function = Magick::annotateImage]'
/usr/include/c++/3.4/bits/stl_algo.h: In function `_Function std::for_each(_InputIterator, _InputIterator, _Function) [with _InputIterator = std::_List_iterator<Magick::Image>, _Function = Magick::annotateImage]':
line.cpp:232: instantiated from here
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
/usr/include/c++/3.4/bits/stl_algo.h:159: error: within this context
Please help!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem with STL annotateImage()

Post by anthony »

I don't know much C++, but that code does not look right.
You have the action inside the loop construct, and you don't seem to have any image increment.

that is before anything like checking the API handling, whicj I can't tell you about for Magick++
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply