Page 1 of 1

how to get the real error string from MagickReadImage

Posted: 2012-06-27T11:54:52-07:00
by umen
Hello all
im begginer with this great lib , and i started to work with simple example .
the problem is that im looking to get the real error ( if even i can get it ) other then true or false
for example i have this function :

Code: Select all

if(MagickReadImage(mw,"D:\\cpp\\debug\\image.jpg") == MagickFalse) {
        // Handle the error
		int y =0;
	}
im getting false all the time , even that the image.jpg is there in the path
can i get more info from the functions? to see what is wrong ?
thanks

Re: how to get the real error string from MagickReadImage

Posted: 2012-06-27T15:57:08-07:00
by el_supremo
Add this piece of code.

Code: Select all

	char error_string[256];
	char *description;
	ExceptionType severity;
	
	description=MagickGetException(mw,&severity);
	FormatLocaleString(error_string,250,"%s %s %lu %s\n",GetMagickModule(),description);
	description=(char *) MagickRelinquishMemory(description);
	// Display the error message
	MessageBox(NULL,error_string,"",MB_OK);
Pete

Re: how to get the real error string from MagickReadImage

Posted: 2012-06-28T00:30:27-07:00
by umen
Thanks
I do get error that says something like :

Code: Select all

 NoDecodeDelegateForThisImageFormat `D:\cpp\\debug\image.jpg' @ error/constitute.c/ReadImage/544
which Decode it talking about ?

im using :
Imagemagick/lib/debug\CORE_DB_magick_.lib
Imagemagick/lib/debug\CORE_DB_wand_.lib

and :
CORE_DB_bzlib_.dll
CORE_DB_lcms_.dll
CORE_DB_magick_.dll
CORE_DB_ttf_.dll
CORE_DB_wand_.dll
CORE_DB_xlib_.dll
CORE_DB_zlib_.dll

do i miss something ?
Thanks

Re: how to get the real error string from MagickReadImage

Posted: 2012-06-28T05:41:53-07:00
by umen
ok i was missing configuration and dll files ,
i didn't find any visual studio tutorial on how to set up simple project ...

Re: how to get the real error string from MagickReadImage

Posted: 2012-12-12T04:39:38-07:00
by gobnait
I absoltyle vfdfewo Pixels will also be setted manually and individually. And at end of setting all array W x H pixels will be pushed to IMagic by SyncImagePixels.