NoDecodeDelegateForThisImageFormat in C++ Project

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
TheProfessor
Posts: 8
Joined: 2014-04-11T10:14:47-07:00
Authentication code: 6789

NoDecodeDelegateForThisImageFormat in C++ Project

Post by TheProfessor »

I had a similar post before but trying to post there gets me a message about how the security cert has expired for this site so I'd rather not risk anything.

Essentially the full error is:

Error loading texture 'Resources/Sup_d.tga': Project.exe:
NoDecodeDelegateForThisImageFormat 'Resources/Sup_d.tga'
@error/constitute.c/ReadImage/550

I've verified that ImageMagick is installed and can convert image files and supports png but the problem persists; another problem is when I try to compile ImageMagick manually the lib files aren't correct and I get Unresolved External errors.

Another problem is if I try to install a dll version of ImageMagick it will have the RC lib files but not the DB files, I need both.

It seems to fail here:

Code: Select all

bool Texture::Load()
{
    try {
        m_pImage = new Magick::Image(m_fileName); // This line here
        m_pImage->write(&m_blob, "RGBA");
    }
    catch (Magick::Error& Error) {
        std::cout << "Error loading texture '" << m_fileName << "': " << Error.what() << std::endl;
        return false;
    }

    glGenTextures(1, &m_textureObj);
    glBindTexture(m_textureTarget, m_textureObj);
    glTexImage2D(m_textureTarget, 0, GL_RGBA, m_pImage->columns(), m_pImage->rows(), 0, GL_RGBA, GL_UNSIGNED_BYTE, m_blob.data());
    glTexParameterf(m_textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameterf(m_textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

    return true;
}
It seems to give that error even if I give it a clearly wrong path, so I can't determine if its finding the correct file or not.
TheProfessor
Posts: 8
Joined: 2014-04-11T10:14:47-07:00
Authentication code: 6789

Re: NoDecodeDelegateForThisImageFormat in C++ Project

Post by TheProfessor »

I've done these commands:

convert logo: logo.png

convert logo.png logo.gif

convert logo.png logo.jpg

They all work.

Edit:

convert granite: granite.png
convert granite.png granite.miff

identify -list format
idenfity -list configure

png included in list of delegates.
TheProfessor
Posts: 8
Joined: 2014-04-11T10:14:47-07:00
Authentication code: 6789

Re: NoDecodeDelegateForThisImageFormat in C++ Project

Post by TheProfessor »

Solved it, had to switch the compiler (Visual Studio 2010) to "Release" mode; I think that's a bug; either with IM or VS2010, should I submit a bug report?
Post Reply