Results 1 to 8 of 8

Thread: QT Jpeg, Gif, Bmp loading issue

  1. #1
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QT Jpeg, Gif, Bmp loading issue

    Hi all,

    I am trying to load image in program and displaying it on label. I am using QPixmap. My code is loading/saving png files but unable to load jpeg,bmp and gif files. I searched the forum and got that i have to use image plugins. so i built my release exe and place imageformat folder with it(e.g. exe is at C:\mydir\test.exe and imageformat folder is placed at C:\mydir\imageformat). I tried to build exe by visual studio 2008 as well as QTCreator but unable to got +ve result.

    Any suggestion what i am missing?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Jpeg, Gif, Bmp loading issue

    It should be "imageformats".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Jpeg, Gif, Bmp loading issue

    @all
    my mistake ; imageformat = imageformats
    and one more thing i am using LGPL version and Qt's ImageViewer sample is also not loading jpeg images.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT Jpeg, Gif, Bmp loading issue

    How was your Qt installed ? Did you compile or did you use the binary ?

  5. #5
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Jpeg, Gif, Bmp loading issue

    I downloaded the sdk from Nokia website and then i installed it. Then i have QT creator to code. After some time i used Visual studio Add in and then follow steps written at - http://dcsoft.wordpress.com/.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Jpeg, Gif, Bmp loading issue

    Where did you copy the imageformats directory from? There are two imageformats directories with Qt SDK and you might you used the wrong one. Also, what exactly does this directory contain?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    meraj ansari (21st May 2010)

  8. #7
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Jpeg, Gif, Bmp loading issue

    @wysota

    Yes you are right there is more then one imageformats folder. When i searched my Qt dir then i got it.
    I was copying from "C:\Qt\2010.02.1\qt\plugins\imageformats" and it is not working. Also it contain dll's and .a files. When i copied imageformats from "C:\Qt\2010.02.1\bin\imageformats" then it is working with jpg,bmp and tiff.

    Thanks all

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Jpeg, Gif, Bmp loading issue

    Actually it should be the other way round. Which probably means you have used Qt DLLs from the wrong directory in the first place.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Loading corrupt jpeg images with QImage
    By mikeee7 in forum Qt Programming
    Replies: 15
    Last Post: 3rd December 2010, 02:59
  2. Loading plugin and "Incompatible Qt library" issue.
    By TorAn in forum Qt Programming
    Replies: 4
    Last Post: 31st May 2010, 14:04
  3. stylesheet loading issue - thread
    By talk2amulya in forum Qt Programming
    Replies: 8
    Last Post: 26th February 2009, 13:53
  4. Loading jpeg (QPixmap with Qt Jambi)
    By Mr_Blonde in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2006, 19:06
  5. Jpeg not support~
    By denny.t in forum Qt Programming
    Replies: 4
    Last Post: 31st March 2006, 10:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.