NoDecodeDelegateForThisImageFormat in C++ Project
Posted: 2014-07-20T14:32:08-07:00
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:
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.
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;
}