sorry to bother you but I need some help. For the last two days I have desperately been trying to install ImageMagick on my computer to use the CImg library. I downloaded and installed the binary executable file and I downloaded Magic++ API and copied all the files into my VC include directory. However I am still receiving numerous error messages, mostly related to convert.exe or some sort of permission issue. I am not installing my ImageMagick in a folder with folders, I have done quite a bit of reading and asking/googling around, but I am at the end of what I can think of to get this sorted.
Essentially I want to be able to run this particular piece of code from the CImg website, which requires ImageMagick for the jpg support.
http://cimg.sourceforge.net/reference/g ... orial.html
(see breakdown below where the lena.jpg file is loaded)
Code: Select all
#include "CImg.h"
using namespace cimg_library;
int main() {
CImg<unsigned char> image("lena.jpg"), visu(500,400,1,3,0);
const unsigned char red[] = { 255,0,0 }, green[] = { 0,255,0 }, blue[] = { 0,0,255 };
image.blur(2.5);
CImgDisplay main_disp(image,"Click a point"), draw_disp(visu,"Intensity profile");
while (!main_disp.is_closed && !draw_disp.is_closed) {
main_disp.wait();
if (main_disp.button && main_disp.mouse_y>=0) {
const int y = main_disp.mouse_y;
visu.fill(0).draw_graph(image.get_crop(0,y,0,0,image.dimx()-1,y,0,0),red,1,1,0,255,0);
visu.draw_graph(image.get_crop(0,y,0,1,image.dimx()-1,y,0,1),green,1,1,0,255,0);
visu.draw_graph(image.get_crop(0,y,0,2,image.dimx()-1,y,0,2),blue,1,1,0,255,0).display(draw_disp);
}
}
return 0;
}
Could somebody maybe help me with a step by step plan on how to get VC2005 to work with ImageMagick? I am running WinXP 64bit.
- I will start with a fresh installation of VC and a fresh installation of ImageMagick binary. This gives me the .exe files like convert etc.
- then copy the Magic++ folder into the VC include folder, get Magic++.h found and working via #include <Magic++.h>
but if I run the above code I get the following error messages:
convert.exe: unable to open image `C:\DOCUME~1\lf\Local`: Permission denied @ blob.c/OpenBlob/2467
`convert.exe` is not recognized as an internal or external command, operable program or batch file.
and more permission and not found errors in regards to convert.exe
why is this happening. After I compile I surely should not need any more external files, I thought after compile the executable that I created is stand-alone and will run on any machine and will not require any libraries or other executables?
and if I do a simple test with the ImageMagic API such as
Code: Select all
#include <Magick++.h>
using namespace Magick;
int main( int /*argc*/, char ** argv)
{
InitializeMagick(*argv);
}
ain.obj : error LNK2019: unresolved external symbol "void __cdecl Magick::InitializeMagick(char const *)" (?InitializeMagick@Magick@@YAXPBD@Z) referenced in function _main
can anybody help me please? This is driving me insane. It must be reasonably simple to do this? Why am I having such a hard time ...