Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [SOLVED] Load jpeg image

    Installation and Deployment
    2
    4
    1662
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gamowaxaky last edited by

      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());
      qApp->addLibraryPath(QApplication::applicationDirPath() + "/imageformats");
      qDebug()<<QImageReader::supportedImageFormats();
      @
      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.

      1 Reply Last reply Reply Quote 0
      • C
        Code_ReaQtor last edited by

        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());
        qApp->addLibraryPath(QApplication::applicationDirPath() + "/imageformats");
        @
        [/quote]

        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.

        Please visit my open-source projects at https://github.com/Code-ReaQtor.

        1 Reply Last reply Reply Quote 0
        • G
          gamowaxaky last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • C
            Code_ReaQtor last edited by

            [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!

            Please visit my open-source projects at https://github.com/Code-ReaQtor.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post