Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QImage, load(), good for Debug, fail for Release
Forum Updated to NodeBB v4.3 + New Features

QImage, load(), good for Debug, fail for Release

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 3.0k Views 1 Watching
  • 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.
  • W Offline
    W Offline
    wuyi12345
    wrote on last edited by
    #1

    Hello,

    I wrote:

    @QImage myImage;
    myImage.load( filePath );
    @
    It works in debug version for any image format. But it failed in release version for jpg image only and works for any other format.

    Please help. Thanks.

    The image file in release version:
    return true for isReadable();
    return true for file.open( QIODevice::ReadWrite );
    return false for myImage.load( filePath ) and myImage.load( &file, "jpg" );

    PC: Windows 7, 64-bits.

    Thanks,

    Yi

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      Is where imageformats folder with image plugins in folder where your executable is?
      have compiled Qt by yourself? Have you configured it with plugin-manifests?
      Are you using VS?

      Have read "Deploying Qt Applications":http://qt-project.org/doc/qt-4.8/deployment.html already?

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wuyi12345
        wrote on last edited by
        #3

        Thanks very much for your reply.

        Is where imageformats folder with image plugins in folder where your executable is?
        No, they are not. In different folders.

        have compiled Qt by yourself? No, I haven't.

        Have you configured it with plugin-manifests? No, I haven't.

        Are you using VS? Yes, I am. VS2008

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AcerExtensa
          wrote on last edited by
          #4

          You should have following structure for working image plugins:
          <your executable>
          imageformat/qjpeg4.dll
          imageformat/q..4.dll

          Also, sometimes helps just to delete Qt's registry cache settings, etc...
          Just delete this key, it will be regenerated again:
          @HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults@

          God is Real unless explicitly declared as Integer.

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wuyi12345
            wrote on last edited by
            #5

            Thanks so much. The problems solved

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved