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
Bookmarks