Results 1 to 10 of 10

Thread: QPixmap won't work on some JPGs

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    Germany
    Posts
    84
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    5
    Thanked 5 Times in 3 Posts

    Default QPixmap won't work on some JPGs

    Hello,
    I'm having some kind of weird problem. I have a small collection of jpg-images and I'm able to display almost all of them using QPixmap. However on some image files this just doesn't work. I just did a

    myLabel->setPixmap(QPixmap("myimagefolger/12.jpg"));

    So, I don't know what the problem is but I searched online for some pictures which QPixmap can't display. I found this:

    http://ia.imdb.com/media/imdb/01/I/26/16/12m.jpg

    To reproduce this behavior simply save this image on your hard disk and let your Qt program display it via QPixmap/QLabel (by the way, QPixmap::isValid() returns false on this image).

    I'm using Qt 4.2.1 and 4.1.4 had the same problem.

    Thank you guys in advance!

    Edit:
    Well, that's awkward - I just tried to open this image with Adobe Photoshop but Photoshop declined the image saying "Could not complete your request because an unknown or invalid JPEG marker type is found."
    Is there some workaround/hack for this?

    Edit 2:
    Umm lol.. I just renamed the file from "12m.jpg" to "12m.gif" and now Photoshop can open it . So this basically means, that my Qt doesn't support GIF?
    Last edited by durbrak; 28th October 2006 at 20:02.

Similar Threads

  1. QPixmap into QTextBrowser
    By xgoan in forum Qt Programming
    Replies: 6
    Last Post: 3rd November 2006, 14:05
  2. QPixmap -> HICON trouble.
    By krivenok in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2006, 16:51
  3. Loading a custom image into a QPixmap
    By KShots in forum Qt Programming
    Replies: 12
    Last Post: 5th August 2006, 01:16
  4. QPixmap and HBITMAP
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 17:24
  5. QTextEdit Justify align making work
    By dec0ding in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2006, 13:02

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
  •  
Qt is a trademark of The Qt Company.