[magick-users] ImageMagick + Turbo C++ (borland builder 2006) - not work :( Exception=420 no decode delegate for this image format

Yurii_Suhanov yuriisuhanoff at mail.ru
Thu Feb 26 15:51:37 UTC 2009


Hello!

I download 
ImageMagick-6.4.3-4-windows.7z
ImageMagick-6.4.3-4-Q16-windows-dll.exe
and install

For CORE_RL_magick_.dll i generate CORE_RL_magick_.lib
(implib -a -c CORE_RL_magick_.lib CORE_RL_magick_.dll)

My Turbo C++ code
++++++++++++
#include <magick\api.h>
#include <vcl.h>
#include <stdio.h>

#pragma hdrstop
#pragma link "CORE_RL_magick_.lib"

#pragma argsused
int main(int argc, char* argv[])
{

	InitializeMagick(*argv);

	MagickCoreGenesis(*argv,MagickTrue);

	if (IsMagickInstantiated()) {
	  printf("yes\n");
	}else{
	  printf("no\n");
	}

	_ExceptionInfo exception;
	GetExceptionInfo(&exception);

	_ImageInfo * image_info;
	 image_info=CloneImageInfo((ImageInfo *) NULL);

	 (void) strcpy(image_info->filename, "12725.bmp");

	 Image * image;
	 image=ReadImage(image_info, &exception);

	if (exception.severity != UndefinedException){
	  CatchException(&exception);
	}else{
		 printf("UndefinedException\n");
	}
	
      if (image == (Image *) NULL){
		 printf("ERR\n");
	}else{
		 (void) strcpy(image->filename,"12725.gif");

		 WriteImage(image_info,image);

		 DestroyImage(image);
		 DestroyImageInfo(image_info);
		 DestroyMagick();
	}//if (image

	return 0;
}
++++++++++++
And it compilling without errors.

I put in catalog my program, all DLL from "ImageMagick-6.4.3-4-Q16-windows-dll" and image 12725.bmp

On my computer (with install ImageMagick-6.4.3-4-Q16-windows-dll.exe) my program run, but "ReadImage" not work and my program return:
+++
yes
UndefinedException
ERR
+++

If i run my program on computer without install ImageMagick-6.4.3-4-Q16-windows-dll.exe
my program return
+++
yes
P1.exe: no decode delegate for this image format `C:/Temp/magick-jsWJFmuG'.
ERR
+++
Why my program search image C:/Temp/magick-jsWJFmuG ?

I try to find the answer in a manual and on the Internet, but i can't find :( 

Help me please! 

PS: Excuse me for bad English
PS2: ImageMagick-6.4.3-4 
Turbo C++ (Borland C++Builder for Microsoft Windows Ver. 10.0.2288.42451 Update 2)
Windows XP SP3


More information about the Magick-users mailing list