Page 1 of 1

Dont work when ImageMagick is not installed.

Posted: 2015-02-04T07:14:16-07:00
by TheDarkBoz
Hello

I have an issue with this code

Code: Select all

	if(!Exist(GetUrlFileSave()+"\\"+Folder))
		CreateDirectory(GetUrlFileSave()+"\\"+Folder,NULL);
	MagickWand *mw = NULL;
	MagickWandGenesis();
	mw = NewMagickWand();
	CString oldname=GetUrlImageFiles()+Folder+"\\"+nanmeFile+"."+extension;
	CString fileurl=GetUrlImageFiles()+Folder+"\\"+nanmeFile+".bmp";
	CString newfile="BMP3:"+GetUrlImageFiles()+Folder+"\\"+nanmeFile+".bmp";
	CString newname=GetUrlFileSave()+Folder+"\\"+nanmeFile+"."+extension;
	MagickBooleanType test= MagickReadImage(mw,oldname);
	CopyFile(oldname,newname,false);
	test=MagickWriteImage(mw,newfile);
	if(mw) mw = DestroyMagickWand(mw);
	MagickWandTerminus();
	return fileurl;
When ImageMagick is installed, I have no problem

When IM is not installed, my exe ask dlls that I added them. So the application is launched but when I use my function. I have no result..

My configuration
OS : Windows 8.1 64 bits
IDE: Visual Studio 2013
ImageMagick: 6.9.0-2Q16 32 bits

Best Regards