need some help... about XWD

Posted on 2003-03-09
Medium Priority
Last Modified: 2013-12-27
hello everyone,

i hope you must be fine. I am Asim Ajmal from Landmark Resources (www.lmkr.com) Islamabad, Pakistan. I am working as a  software developer over need some help... about XWDhere.

I need some help to capture the screen in linux in .xwd form. I know that XWD command exist in Linux OS but i need its implementation. i had developed a solaris based screen capture utility for 24bit depth for XRunner (a Mercury interactive product). Initialy i used XGetImage API to capture the screen, but in case of overlaps of different visuals/depth windows there was some distortion in results, so i used XReadScreen() API, but that API was specific to solaris, this API takes screen shots in 24bit depth, and in case of multiple depth/visuals overlaps it takes screen shot in highest depth available, just as XWD command do in unix.

now i have to implement same thing on Linux, i cant port the solaris code beacuse XReadScreen() is specific to solaris. Can you tell me any alternate API in Linux? XGetImage is fine in case of same visuals overlap, but different visuals overlap it is not desirable. If you know any API like XReadScreen then please let me know, or any help in this regard.

i tried to search the source code of xwd and xwud (on linux) at /usr/src but i m helpless. waiting for relevant reply.


Asim Ajmal
Software Developer
LMK Resources,
A Landmark Graphics Affiliated Company
E-mail: <##e-mail removed by majorwoo, EE Page Editor##>
Phone: <##phone removed by majorwoo, EE Page Editor##>
Fax: <##phone removed by majorwoo, EE Page Editor##>
Cell: <##phone removed by majorwoo, EE Page Editor##>
Question by:asimz77
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 20

Accepted Solution

Gns earned 300 total points
ID: 8102392
This must be one of the most explored areas, when it comes to X applications:-).

There are a large amount of "snapshoters" and "screendumpers". xwd, xwpick, ksnapshot ...
Downloading the source code to any of these should be informative.

If I understand you correctly, you haven't got the source code for xwd? Get it from http://www.xfree86.org, it is part of the "standard toolset" bundled with X.
ksnapshot can be gotten from http://www.kde.org, where it is bundles in "kdegraphics".
xwpick is ... xwpick... you could get it (source) from any number of sources... Why not http://www.debian.org ...

Any of these should be provided to you (in source form) by your linux distributor. The form and "placement" of the source is often a bit quirky... Installing a RedHat source rpm will "install" the still packed tar-ball to /usr/src/...somewhere..., while Mandrake only supply source RPMs via direct download, etc etc.

-- Glenn
LVL 20

Expert Comment

ID: 8102407

Expert Comment

ID: 8142254
try GIMP http://www.gimp.org this program can take screenshots with very good results..


Expert Comment

ID: 9089955
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 20

Expert Comment

ID: 9099642
Interpreting the question as asking for relevant example source code, this question has been answered in adequate detail by me.

-- Glenn

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question