Results 1 to 5 of 5

Thread: Printing RGB datas into widget

  1. #1
    Join Date
    Jan 2007
    Posts
    5
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Printing RGB datas into widget

    hi everyone,
    i am using qt-embedded 3.3.5.I want to display RGB datas into my widget..
    i had read the Bmp image (600x800) and skipped the header(54 Bytes) details and store that datas into an tempPixelData..
    first of all i had displayed only first 10 lines and displayed the RGB datas using pixel,QRgb and QPainter....

    But I am getting only Red color in that first 10 lines....

    is it correct?

    please let me know..

    I had attached the code and also Output screen shot..


    regards,

    srini
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Printing RGB datas into widget

    - why do you want to do it that way and don't use QImage?
    - see also
    http://www.qtcentre.org/forum/f-qt-p...ssue-5478.html
    http://www.qtcentre.org/forum/f-qt-p...ixel-5477.html
    http://www.qtcentre.org/forum/f-qt-p...g-qt-5401.html
    -> when you want to access the bmp directly (I can't think of any situation where this is really needed) you have to *know* the bmp format and can't simply access the bits like you think they're arranged

  3. #3
    Join Date
    Jan 2007
    Posts
    5
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Printing RGB datas into widget

    Thanks for your reply,
    Now i have to read only RGB datas and display it pixel by pixel into an widget. which QT class i have to use?

    regards..
    srini

  4. #4
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Printing RGB datas into widget

    When it's really rgb data, your approach is correct (I would maybe use a QImage with setPixel and the paint the QImage to my widget). But because you see only red color, I assume that's not only rgb data but coded in another way - and as I said in the other threads - you have to know the structure of the data you want to display.

  5. #5
    Join Date
    Jan 2007
    Posts
    5
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Printing RGB datas into widget

    I just printed the RGB datas in my Terminal....i got these
    temppixel data array :rsrts\u251c
    \u23bd
    ± \u2524
    ±
    °

    \u240c
    ]
    TKFS_
    \u23bc

    \u2265\u2500\u23ba\u23bapvz}}[V
    N
    .&%"0/ E
    #
    (
    -49=<>BGIH
    E ]!Z X S!P!N$L$LY
    ^°j
    s#n!fdl jkm%
    z\uffff

    Regards,,,
    srini

Similar Threads

  1. Replies: 1
    Last Post: 5th November 2006, 23:50
  2. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57
  3. minimize child widget
    By sreedhar in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2006, 12:02
  4. Replies: 4
    Last Post: 24th March 2006, 22:50
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.