About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Artifacts while drawing dynamic image
Author Message
rndbit Offline
Member

Post: #1
Artifacts while drawing dynamic image
I am trying to render Qt gui as overlay image. Result is quite weird: http://prntscr.com/1h7fi

as you see it almost works. Qt frame is moved to 100;100 pos and it is drawn properly. Only this strip of distorted gui element on top... Where could they come from? Btw if i move gui elements to pos 0;0 then artifact is drawn over gui. (gui positions provided are in pixes btw)

Some code:
Image tex;
tex.create2D(_width, _height, IMAGE_B8G8R8A8); // width and height are in pixels
....
QImage image(rect.width(),rect.height(),QImage::Format_ARGB32);
...
if(tex.lock())
{
Copy(tex.data(), image.bits(), image.byteCount());
tex.unlock();
}
(This post was last modified: 01-27-2011 03:58 PM by rndbit.)
01-27-2011 03:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Artifacts while drawing dynamic image
this is your error:
Copy(tex.data(), image.bits(), image.byteCount());

try checking image pitch, pixel sizes, etc.
01-27-2011 04:04 PM
Find all posts by this user Quote this message in a reply
Post Reply