I got this error during loading a PCX image, and other formats such as PNG, JPEG.
My code is as following:
Code: Select all
try {
m_pImage = new Magick::Image(m_fileName); // I got the error here
m_pImage->write(&m_blob, "RGBA");
}
catch (Magick::Error& Error) {
std::cout << "Error loading texture '" << m_fileName << "': " << Error.what() << std::endl;
return false;
}
And this is the information of ImageMagick in my machine:
- Command line: convert -list configure
- Delegate: bzlib, freetype, jpeg, jp2, lcms, png, tiff, x11, xml, wfm, zlib
- Features: OpenMP
- Host: WIndows
- Lib_version: 0x687
I also tried to use the command: convert filename.pcx filename.png. ==> It did well, and I got the png image
My guess is my program doesn't know where to load ImageMagick DLL, and delegate DLL, but I configure environment variables such as MAGIC_HOME, MAGICK_CODER_MODULE_PATH, MAGICK_CODER_FILTER_PATH. It still doesn't work, I got the same error.
I'm desperate now. I really need your help!!