Page 1 of 1

NoDecodeDelegateForThisImageFormat in C++ Project

Posted: 2014-07-20T14:32:08-07:00
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.

Re: NoDecodeDelegateForThisImageFormat in C++ Project

Posted: 2014-07-20T18:47:17-07:00
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.

Re: NoDecodeDelegateForThisImageFormat in C++ Project

Posted: 2014-07-20T19:27:21-07:00
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?