Results 1 to 4 of 4

Thread: jpeg image not getting displayed

  1. #1
    Join Date
    Sep 2017
    Posts
    22
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default jpeg image not getting displayed

    Hi,

    I am having issues in displaying jpeg image, My code first displays the gif image using QMovie.

    The finished signal of movie is connected to slot which should show a jpeg image.

    Below is the sample code, Base is the main GUI thread.

    Note: If I use fbi tool to display image it works fine.

    Qt Code:
    1. void Base::displayWelcomeScreen()
    2. {
    3. //Start the presentation (gif)
    4. presnLabel.resize(480,350); //keeping width 350 acc to the gif
    5. movie.setFileName("/usr/.images/is5RaptorLoading.gif");
    6. presnLabel.setMovie (&movie);
    7. movie.start ();
    8. presnLabel.show();
    9. }
    10. /*Slot function*/
    11. void Base::displaySysInfoScreen()
    12. {
    13. //Display the Raptor system information screen
    14. presnLabel.hide();
    15. qDebug() << "Main Thread (BASE): Displaying the system information screen \n";
    16. QPixmap pm("usr/.images/is5RaptorSysInfo.jpeg");
    17. presnLabel.setPixmap(pm);
    18. presnLabel.show();
    19. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by nitks.abhinav; 17th October 2017 at 23:33.

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: jpeg image not getting displayed

    Check if you have a jpeg plugin.

  3. #3
    Join Date
    Sep 2017
    Posts
    22
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: jpeg image not getting displayed

    Yes you are correct, the jpeg plugin was not there, Thank you.

    I have couple of more questions related to this:

    1) Can bmp image be displayed in similar way?
    2) My jpeg is not aligned to the LCD screen, I can see it shifted to both right and up. Hoe to align it?

    Thanks

  4. #4
    Join Date
    Sep 2017
    Posts
    22
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: jpeg image not getting displayed

    I have found the way, Thanks for all the help!

Similar Threads

  1. How to convert JPEG image into binary data?
    By Gokulnathvc in forum Newbie
    Replies: 1
    Last Post: 7th June 2011, 09:43
  2. Saving image in jpeg format failed
    By febil in forum Qt Programming
    Replies: 5
    Last Post: 23rd April 2009, 12:33
  3. image not displayed ...
    By sh123 in forum Qt Tools
    Replies: 4
    Last Post: 15th December 2008, 14:07
  4. Can't Write Image as Jpeg file
    By noufalk in forum Qt Programming
    Replies: 4
    Last Post: 25th July 2007, 15:53
  5. JPEG Image isn't displayed!?
    By GodOfWar in forum Qt Programming
    Replies: 9
    Last Post: 16th April 2007, 16:01

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.