Magick++: image reading collapse! HELP!

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
JimJim
Posts: 3
Joined: 2011-11-26T12:19:23-07:00
Authentication code: 8675308

Magick++: image reading collapse! HELP!

Post by JimJim »

Recently i am learning Magick++.h, i installed the ImageMagick-6.7.3-7-Q16-windows-dll on my window7, and i use VS2010 professional edition.
Here is the problem:
i write a simple program for testing, the code is as follows:

Code: Select all

    #include <Magick++.h>
    using namespace std;
    using namespace Magick;
    int main()
    {	
    	
    	Image image( "E:/DataMining/dataset_2img/300.jpg");
    
    	return 0;
    }
It compiles good, but everytime i debug the program it gives a "Access violation reading location..."problem, where i does wrong? Is the image file path format wrong? Is it "E:\\DataMining\\dataset_2img\\300.jpg"? Please tell me, any advice would be a great help for me.
PS:VS2010 builds the Magick++_Demo very well.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Magick++: image reading collapse! HELP!

Post by magick »

It could be your IDE project configuration. Replace the source of the Button project in Magick++_demos with your code. Build and execute. Does it work now?
JimJim
Posts: 3
Joined: 2011-11-26T12:19:23-07:00
Authentication code: 8675308

Re: Magick++: image reading collapse! HELP!

Post by JimJim »

magick wrote:It could be your IDE project configuration. Replace the source of the Button project in Magick++_demos with your code. Build and execute. Does it work now?
Thank you for advice.
But it doesn't work, now i am really stuck, PLEASE HELP ME!
JimJim
Posts: 3
Joined: 2011-11-26T12:19:23-07:00
Authentication code: 8675308

Re: Magick++: image reading collapse! HELP!

Post by JimJim »

magick wrote:It could be your IDE project configuration. Replace the source of the Button project in Magick++_demos with your code. Build and execute. Does it work now?
Yes, it works !
I copied the project in explorer and removed files and added my files and it worked!But what's wrong with my previous settings? I cannot always do so, right?
My ImageMagick-6.7.3-Q16 folder's full path is E:\ProgramFiles\ImageMagick-6.7.3-Q16, and the include folder and lib folder are
E:\ProgramFiles\ImageMagick-6.7.3-Q16\include, E:\ProgramFiles\ImageMagick-6.7.3-Q16.
Previously, I created a project named CBIR2, and add the above cpp file to it. The setting of CBIR2 project property is shown in these image captures , please help find where is wrong or what should be added, thank you very much.

[img]
http://115.com/file/e7h1ylfr#
CBIR25.jpg
http://115.com/file/be4nzwe8#
CBIR24.jpg
http://115.com/file/e7h1yfco#
CBIR23.jpg
http://115.com/file/dpyj629k#
CBIR22.jpg
http://115.com/file/e7h1ywzy#
CBIR21.jpg[/img]
Post Reply