program crashes at first image magic line

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ulao
Posts: 9
Joined: 2011-10-26T06:30:54-07:00
Authentication code: 8675308

program crashes at first image magic line

Post by ulao »

I'm using imageMagic in a dll compilation to rotate an image. Seem no matter what function I use, other then the init, will put may app in a loop until it crashes.


InitializeMagick(""); //executes
Image image( "100x100", "white" ); //dies here [Caught exception: Magick: NoDecodeDelegateForThisImageFormat `#FFFFFFFFFFFF' @ error/constitute.c/ReadImage/532]
image.pixelColor( 49, 49, "red" );
image.write( "red_pixel.png" );

I went a head and tried this is a test project ( flip example ) and I get unhandled exception in the magick::errorMissingDeleate magick_home is set to the install path ( the parent of Magick++ )


I saw a thread about MAGICKCORE_INSTALLED_SUPPORT, and I do not have this defined. my magic_home is set to my install path
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: program crashes at first image magic line

Post by anthony »

I am not certain of the API that is being used. But shouldn't you create a 'new image' before reading the image in?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
ulao
Posts: 9
Joined: 2011-10-26T06:30:54-07:00
Authentication code: 8675308

Re: program crashes at first image magic line

Post by ulao »

I though that is what this line was
Image image( "100x100", "white" );
? - however this was in fact just test code, seem to be working as I intended it by reading from memory.
Post Reply