Results 1 to 20 of 25

Thread: QImage::scaled cause "raster"/"grid"

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    49
    Thanks
    2
    Thanked 4 Times in 1 Post

    Default QPainter::drawImage has "grid" if the QImage size is big then widget

    Hello, every body ..
    I am using Qt-4.6 to implement a camera application, that capture preview and the camera output on windows PC / linux PC,

    I capture the camera raw RBG output from USB in a thread, then convert it to RGB888 format and store it in a QImage in another thread,
    after that I use QPainter::drawImage to draw on a QWidget for previewing. if the camera resolution is not fit with the widget size, then the image would be scaled to the widget size i think.

    As your see in the attached photos, the preview image seems fill with "grid", but if I directly save the QImageinto a jpeg file, and watch it with a photo view tool, then it seems ok.


    the camera output resolution is 864*600, and
    1.jpg -- preview in a small widget,
    2.jpg --- preview in a small widget, but large the previews one.
    3.jpg --- the widget size is equal to the camera resolution.

    How to fix this ?

    or is there a better way to go ?

    /WX
    Attached Images Attached Images
    • File Type: jpg 2.jpg (38.6 KB, 44 views)
    • File Type: jpg 1.jpg (46.6 KB, 36 views)
    • File Type: jpg 3.jpg (54.3 KB, 32 views)
    Last edited by wesley; 28th January 2010 at 06:36.

Similar Threads

  1. Replies: 3
    Last Post: 8th July 2008, 19:37
  2. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  3. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.