[SOLVED] Load jpeg image

  • Hi everyone,
    I have a problem when trying to load jpeg image into my app. I copied imageformats/qjeg4.dll into my app directory and used:
    qApp->addLibraryPath(QApplication::applicationDirPath() + "/imageformats");
    but the last statement return:
    ("bmp", "pbm", "pgm", "png", "ppm", "xbm", "xpm")

    I have searched this forum and saw some related topics but the solutions didn't work for me.
    Could anyone help me?

    Thanks in advanced.

  • how did you build your app? If you copied the dll file on the imageformats folder, you certainly dont need these lines.

    [quote author="gamowaxaky" date="1354564882"]
    qApp->addLibraryPath(QApplication::applicationDirPath() + "/imageformats");

    AFAIK, you only copied qjeg4.dll which is used only for "RELEASE". If you built your app in DEBUG, it will not work. You need to copy qjegd4.dll too.

  • Thanks Code_ReaQtor for your help.
    Finally I figured out that I used newer dlls version than the Qt version used to build my app. The problem was solved when I used the proper dlls, without any lines of the above code.

  • [quote author="gamowaxaky" date="1354603370"]Thanks Code_ReaQtor for your help.[/quote]

    You're welcome. :)

    You may mark this thread as [Solved] then.

    Happy coding!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.