0
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <Magick++.h>
#include <list>
using namespace std;
using namespace Magick;

int main(int argc, char **argv) {

try {
    InitializeMagick(*argv);
    Image my_image("D:\\test.jpg");
    unsigned int x;
    unsigned int columns(x); 

    cout << "width: " << x << endl;

}
catch (Magick::Exception & error) {
    cerr << "Caught Magick++ exception: " << error.what() << endl;
}
getchar(); 
return 0;
}

this doesnt work. pls help

simillar problem here with no answers Magick++ undefined reference to Magick::Image::Columns

6
  • Magick::Image has attributes baseColumns and baseRows which represent the width and height, respectively. It also has size which returns a Magick::Geometry from which the width and height can be retrieved. Commented Oct 14, 2017 at 10:44
  • "this doesnt work". Does this clears your hard drive? Commented Oct 14, 2017 at 10:45
  • it gives me random number Commented Oct 14, 2017 at 11:56
  • how to do it mark? Commented Oct 14, 2017 at 13:32
  • x=my_image.baseColumns; maybe. Commented Oct 14, 2017 at 20:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.