Page 1 of 1

PNG loading error in ImageMagick library

Posted: 2013-10-28T00:42:33-07:00
by khanhhh90
I'm trying to understand [the tutorial 16][1] at http://ogldev.atspace.co.uk, which requires the image processing library [ImageMagick][2].
But when I run the tutorial, I encountered an following error:
  • Freeglut: failed to change screen settings
    Error loading textures 'test.png': no decode delegates for this image format 'C:/../appdata/magick-6024a_cIJcw90t-j'@error/constitute.c/ReadImage/552
At the code section:

Code: Select all

    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;
    }
I searched for google and found out that my ImageMagick library do not have a PNG delegate, but when I checked for the information of ImageMagick library in my machine (Windows 7 64 bit), I see PNG in its delegate lists.
  • Command line: convert -configure
    Result: LIB_VERSION 0x687
    DELEGATES: bzlib, freetype, jpeg, jp2, lcms, png, tiff, x11, xml, wmf, zlib
Could you explain to me this error, thanks so much!

Re: PNG loading error in ImageMagick library

Posted: 2016-04-15T09:16:42-07:00
by wangdechao
I meet this problem as well and I look for the answer in the Internet but it doesn't work.Finally I modify my name of the file in the path of the picture and I fix this problem.Keep the file which is in the path in English even you use the relative path!!