Results 1 to 4 of 4

Thread: Corrupt JPEG data

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Corrupt JPEG data

    I know that QHttp is able to retrieve data from web servers. I have use it and I can display different websites in a QTextBrowser.

    How can I get just 1 image from any web server with QHttp ?

    Sp far, I can connect to a web server. The data received is saved in a QByteArray, but I cannot show the image.

    I get this error:

    Corrupt JPEG data: 1 extraneous bytes before marker 0xd9
    JPEG datastream contains no image

  2. #2
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Corrupt JPEG data

    Could you please stop opening a new Thread every day for the same problem?

    Instead please answer the questions I asked you to in your last thread so that it is possible to help you as you are not giving enough information here to solve your problem.

  3. #3
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Corrupt JPEG data

    I have told you:

    The image is accessible from any browser.
    The image is valid .jpg or .png
    The image is stored in my QByteArray.

    For some reason it is not shown.

  4. #4
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Corrupt JPEG data

    Quote Originally Posted by probine View Post
    I have told you:

    The image is accessible from any browser.
    The image is valid .jpg or .png
    The image is stored in my QByteArray.

    For some reason it is not shown.
    Yes, but actually those pieces of information is not what I asked for. (Nor do they help much at this point)

    A few questions that might help me help you:
    1. Did it work trying to display it in the label? (it was commented out in your code) What happened if it did not work?
    2. Do you have any conversions QByteArray -> QString? (for example in site.append())
    3. Doesn't the loadResource method work? What happens if you try it? What is the problem with it?
    4. Have you tried to write out the contents of the QByteArray to a file? What does the content look like? Could you display that file?

Similar Threads

  1. QSqlQueryModel data update
    By psi in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2012, 03:59
  2. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53
  3. QFtp->List() does not recieve any data
    By nopalot in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2006, 20:42
  4. How to convert binary data to hexadecimal data
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 8th March 2006, 16:17
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.