Bug 35807 - xwd dumps have more than one frame
Summary: xwd dumps have more than one frame
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xwd (show other bugs)
Version: 7.6 (2010.12)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Keith Packard
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 09:32 UTC by sworddragon2
Modified: 2018-08-10 20:35 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xwd dump with 2 frames (342.55 KB, image/png)
2011-03-30 09:32 UTC, sworddragon2
no flags Details

Description sworddragon2 2011-03-30 09:32:10 UTC
Created attachment 45053 [details]
xwd dump with 2 frames

I have linked the command "xwd -root -out ~/screenshots/test.xwd" to the print key and played the game Minecraft. After I have made a screenshot with the print key the dump was a record of more frames. The attachement shows this corruption.
Comment 1 Jeremy Huddleston Sequoia 2011-10-04 00:57:41 UTC
yeah, after reading through xwd's multiVis.c, it looks like ReadAreaToImage 
eventually does:

for (y1 = 0; y1 < srcRect_height; y1++) {
  for (x1 = 0; x1 < srcRect_width; x1++) {
    int pixel_value = XGetPixel(image, x1, y1);
    if (pixel_value & transparentColor) {
      pixel = XGetPixel(ximage_ipm,dst_x+x1,dst_y+y1) ;
      XPutPixel(ximage,dst_x+x1, dst_y+y1,pixel);

I'm not that good with this side of X11 ... Keith, is my analysis at least in 
the right direction?  I don't understand why xwd is going pixel by pixel ...
Comment 2 sworddragon2 2013-08-24 02:36:29 UTC
Is multiVis.c only related to xwd or to the complete X.Org-Server? I'm asking this because if I'm capturing a video with ffmpeg/avconv with the option x11grab I'm seeing this tearing heavily in the captured video too.
Comment 3 sworddragon2 2014-05-05 22:59:26 UTC
This issue still appears on the X.Org-Server 1.15.1.
Comment 4 sworddragon2 2014-05-05 23:08:09 UTC
Edit: Forgot to say that I'm also on x11-apps 7.7+2 in case it is not a direct issue with the X.Org-Server as assumed above. If this is really the case maybe xwd should just dump the image directly from the memory if Xlib provides such a function.
Comment 5 Alan Coopersmith 2018-06-17 19:47:13 UTC
(In reply to sworddragon2 from comment #2)
> Is multiVis.c only related to xwd or to the complete X.Org-Server?

Only to xwd.

(In reply to sworddragon2 from comment #4)
> If this is really the case maybe xwd should just dump the image directly from
> the memory if Xlib provides such a function.

xwd doesn't have direct access to the memory with the screen image in - that's
in the X server (and often in the VRAM, not normal RAM), not in the X client.
Comment 6 GitLab Migration User 2018-08-10 20:35:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xwd/issues/1.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.