Results 1 to 3 of 3

Thread: QImage.loadFromData won't work

  1. #1
    Join Date
    May 2009
    Posts
    9
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QImage.loadFromData won't work

    Hi all.

    I'm trying to load a QImage using QImage.loadFromData (PyQt4) but it returns False meaning something went wrong. But how can I know what's the problem? I'm pretty sure my data string is correct.
    There's a way to have an error message?

    thank you.
    Last edited by cil; 18th April 2011 at 13:27. Reason: some words misspelled

  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: QImage.loadFromData won't work

    What is the content of the byte array you are passing to the method?
    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 2009
    Posts
    9
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QImage.loadFromData won't work

    the content of the array is the raw content of a jpeg file


    Added after 38 minutes:


    Suspecting some broken dependancies and recompiled packages qt-core and qt-gui. Now it works... But an error message lets saving time.

    Thank you anyway.
    Last edited by cil; 18th April 2011 at 16:22.

Similar Threads

  1. loadFromData() of QImage crash in case of .gif loading
    By santosh.kumar in forum Qt Programming
    Replies: 11
    Last Post: 9th March 2011, 11:52
  2. loadFromData() of QImage -crash in case of .gif loading
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2011, 11:56
  3. QImage loadFromData
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2008, 18:57
  4. QImage::loadFromData() behaviour
    By Caius Aérobus in forum Qt Programming
    Replies: 10
    Last Post: 29th November 2007, 21:21
  5. QImage loadFromData not run... XPDF data
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2007, 11:51

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.