NoDecodeDelegateForThisImageFormat

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
prophetic_oleg

NoDecodeDelegateForThisImageFormat

Post by prophetic_oleg »

here my code:

#include <Magick++.h>
#include <string>
#include <iostream>
using namespace std;
using namespace Magick;
int main( int /*argc*/, char ** argv)
{

// Initialize ImageMagick install location for Windows
InitializeMagick(*argv);

try {
Image image("granite.png");
}
catch( exception &error_ )
{
cout << "Caught exception: " << error_.what() << endl;
return 1;
}

return 0;
}

And i have this eeror:
Caught exception: button.exe: NoDecodeDelegateForThisImageFormat

Why it is happening?
Please, help me.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: NoDecodeDelegateForThisImageFormat

Post by magick »

Type
  • convert granite.png granite.miff
Do you get the same exception? If so you most likely are using a version of ImageMagick that did not include PNG support at build time. To confirm type
  • identify -list format
    identify -list configure
Was PNG listed as a supported format?
prophetic_oleg

Re: NoDecodeDelegateForThisImageFormat

Post by prophetic_oleg »

after
convert granite.png granite.miff
i am not ger any error and file granite.miff was created.

and in identify -list format

The PNG was listed as a supported format.
prophetic_oleg

Re: NoDecodeDelegateForThisImageFormat

Post by prophetic_oleg »

magick thank you.
All is work.
But i have other question:
when i wright:
image.display();
i have this error: UnableToOpenXServer 'No such file or directory'
As to me to get rid of it?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: NoDecodeDelegateForThisImageFormat

Post by anthony »

You need a DISPLAY environment variable pointing to a running X windows display.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply