simple program problem! help me.

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
honof1111

simple program problem! help me.

Post by honof1111 »

I have a strange problem. I have written a simple program to open a image. but when it run I receive an exception


Unhandled exception at 0x100239a5 in testImage.exe: 0xC0000005: Access violation writing location 0xcdb96d7c.


my program

Code: Select all

#include <iostream>

#include <Magick++.h> 

using namespace std; 
using namespace Magick; 
int main(int argc,char **argv) 
{ 
	// Read GIF file from disk 
	Image image;
	//image.read("pippo.jpg");

	try { 
		// Read a file into image object 
		image.read("pippo.jpg"); 
	} 
	catch( Exception &error_ ) 
	{ 
		std::cout << "Caught exception: " << error_.what() << endl; 
		return 1; 
	}

	return 0; 
}

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

Re: simple program problem! help me.

Post by magick »

Go to c:/Program Files/ImageMagick-6.3.4/Magick++_Demos. Fire up the button workspace, compile and run. Assuming it runs, use the button workspace as a template for your own project. Most likely your program will run without complaint.
Post Reply