I am trying to use ImageMagick to load a Mesh texture (made in Blender) from the ASSIMP library. The mesh has a single material and a single texture.
I tried to complete two tutorials: Tutorial38 and Tutorial22 .
Below the code block is where it has problems;
bool Texture::Load()
{
try {
m_pImage = new Magick::Image(m_fileName);
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 exits Try-Catch almost immediately with the current error:
"Error loading texture, 'Resources / white.png': myproject.exe: NoDecodeDelegateForThisImageFormat 'Resources / white.png' error / make up .c / ReadImage / 550
, ImageMagick , , libs ( 2-3 , ).
:
ImageMagick-6.6.5-10
ImageMagick-6.6.0
ImageMagick-6.8.9
ImageMagick-windows zip .
, , , Release Candidate, Debug lib, ; , , , Unresolved External Include Lib.
, , , , ImageMagick , ... , .
- 1:
- / libpng .