public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* window image capture how
@ 2004-01-13 12:25 Haisam K. Ido
  2004-01-13 14:01 ` Alexander Gottwald
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Haisam K. Ido @ 2004-01-13 12:25 UTC (permalink / raw)
  To: cygwin-xfree

How can one capture an image of cygwin window into a winxp clipboard and
then print/edit etc?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 12:25 window image capture how Haisam K. Ido
@ 2004-01-13 14:01 ` Alexander Gottwald
  2004-01-13 14:48 ` Haisam K. Ido
  2004-01-13 14:59 ` Igor Pechtchanski
  2 siblings, 0 replies; 9+ messages in thread
From: Alexander Gottwald @ 2004-01-13 14:01 UTC (permalink / raw)
  To: cygwin-xfree, haisam

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> How can one capture an image of cygwin window into a winxp clipboard and
> then print/edit etc?

xwd -display :0.0 | convert - /tmp/root.gif

This requires ImageMagic to be installed. The cursor changes into a cross
and you can click on the window you want to capture.

For further features of xwd see man xwd.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 12:25 window image capture how Haisam K. Ido
  2004-01-13 14:01 ` Alexander Gottwald
@ 2004-01-13 14:48 ` Haisam K. Ido
  2004-01-13 15:21   ` Alexander Gottwald
  2004-01-13 14:59 ` Igor Pechtchanski
  2 siblings, 1 reply; 9+ messages in thread
From: Haisam K. Ido @ 2004-01-13 14:48 UTC (permalink / raw)
  To: cygwin-xfree

> How can one capture an image of cygwin window into a winxp clipboard and
> then print/edit etc?
>

I'm able to do this (using netpbm) but can I pipe to a clipboard area?

xwd | xwdtopnm | pnmtopng > /cygdrive/d/TEMP/screen.png


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 12:25 window image capture how Haisam K. Ido
  2004-01-13 14:01 ` Alexander Gottwald
  2004-01-13 14:48 ` Haisam K. Ido
@ 2004-01-13 14:59 ` Igor Pechtchanski
  2 siblings, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2004-01-13 14:59 UTC (permalink / raw)
  To: cygwin-xfree, haisam

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> How can one capture an image of cygwin window into a winxp clipboard and
> then print/edit etc?

This is not Cygwin-specific, but you can capture any Windows window to
clipboard by pressing Alt-PrtSc.  To get an X window that way, you may
need to run X in multiwindow mode.  Just for the archives.

You can also write to /dev/clipboard from any Cygwin program to copy to
the Windows clipboard (or read from there to paste).  I'm not sure what
happens if you write an image there, though -- I think it's not set to the
right format.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 14:48 ` Haisam K. Ido
@ 2004-01-13 15:21   ` Alexander Gottwald
  2004-01-13 19:28     ` Haisam K. Ido
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Gottwald @ 2004-01-13 15:21 UTC (permalink / raw)
  To: cygwin-xfree, haisam

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> > How can one capture an image of cygwin window into a winxp clipboard and
> > then print/edit etc?
> >
> 
> I'm able to do this (using netpbm) but can I pipe to a clipboard area?
> 
> xwd | xwdtopnm | pnmtopng > /cygdrive/d/TEMP/screen.png

/dev/clipboard is available but can not handle images. 

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 15:21   ` Alexander Gottwald
@ 2004-01-13 19:28     ` Haisam K. Ido
  2004-01-14 12:21       ` Alexander Gottwald
  2004-01-14 16:14       ` Igor Pechtchanski
  0 siblings, 2 replies; 9+ messages in thread
From: Haisam K. Ido @ 2004-01-13 19:28 UTC (permalink / raw)
  To: cygwin-xfree

I don't have /dev directory at all!!!!

I wasn't very clear, how do I copy this to WinXP's clipboard?

> On Tue, 13 Jan 2004, Haisam K. Ido wrote:
>
>> > How can one capture an image of cygwin window into a winxp clipboard
>> and
>> > then print/edit etc?
>> >
>>
>> I'm able to do this (using netpbm) but can I pipe to a clipboard area?
>>
>> xwd | xwdtopnm | pnmtopng > /cygdrive/d/TEMP/screen.png
>
> /dev/clipboard is available but can not handle images.
>
> bye
> 	ago
> --
>  Alexander.Gottwald@s1999.tu-chemnitz.de
>  http://www.gotti.org           ICQ: 126018723
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 19:28     ` Haisam K. Ido
@ 2004-01-14 12:21       ` Alexander Gottwald
  2004-01-14 16:14       ` Igor Pechtchanski
  1 sibling, 0 replies; 9+ messages in thread
From: Alexander Gottwald @ 2004-01-14 12:21 UTC (permalink / raw)
  To: cygwin-xfree, haisam

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> I don't have /dev directory at all!!!!

This is a virtual filesystem. You don't see the entry with ls /dev, but
it is there

 ls -l /dev/* /dev/null

> I wasn't very clear, how do I copy this to WinXP's clipboard?

 Either use alt-printscreen to capture the whole window or 
 use one of the solutions with xwd which create a file, open
 the file in a image processing program and copy it to clipboard.

 There is no other way.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: window image capture how
  2004-01-13 19:28     ` Haisam K. Ido
  2004-01-14 12:21       ` Alexander Gottwald
@ 2004-01-14 16:14       ` Igor Pechtchanski
  1 sibling, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2004-01-14 16:14 UTC (permalink / raw)
  To: cygwin-xfree, haisam

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1537 bytes --]

Haisam,

/dev is a virtual directory in Cygwin (as Alexander already pointed out).
You may not see it in "ls /", but try "ls /dev/clipboard", and it'll be
there.  A while ago I posted a script to the cygwin list that would create
a real directory and files to allow listing and tab-completion in the
virtual one.  It seemed at the time that the script would soon become
obsolete (once Cygwin had true mkdev), but that's still some way off at
the moment.  So, I'm attaching a new version of this script.  Simply run
it, and then you'll be able to do "ls /dev" and see the device files.
HTH,
	Igor

On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> I don't have /dev directory at all!!!!
>
> I wasn't very clear, how do I copy this to WinXP's clipboard?
>
> > On Tue, 13 Jan 2004, Haisam K. Ido wrote:
> >
> >> > How can one capture an image of cygwin window into a winxp
> >> > clipboard and then print/edit etc?
> >>
> >> I'm able to do this (using netpbm) but can I pipe to a clipboard area?
> >>
> >> xwd | xwdtopnm | pnmtopng > /cygdrive/d/TEMP/screen.png
> >
> > /dev/clipboard is available but can not handle images.
> >
> > bye
> >       ago

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2300 bytes --]

#!/bin/sh
# Create devices
# Author: Igor Pechtchanski <pechtcha@cs.nyu.edu>
# Version: 1.0 
#

# Number of devices of a certain type to be created - change if more needed
CREATEDEV=32
# Parameters end here -- you shouldn't have to change anything below this line

# Actual /dev directory
DEVDIR="$(cygpath -au "C:/$(cygpath -aw /dev)" | sed 's,/c/\(.\):/,/\1/,')"
# Sequence of services to generate
ALL="$(seq -s " " 0 $(expr $CREATEDEV - 1))"

error() { echo "$@" && exit 1; }

[ -e "$DEVDIR" -a ! -d "$DEVDIR" ] && \
   error "$DEVDIR exists and is not a directory"
[ ! -e "$DEVDIR" ] && \
   (mkdir "$DEVDIR" || error "Unable to create $DEVDIR")
[ -w "$DEVDIR" ] || error "$DEVDIR exists, but isn't writeable"
cd "$DEVDIR" || error "Unable to cd to $DEVDIR"

# - console (1,*)
for i in conin conout tty; do touch ./"$i"; done
# - tty master (4,*)
for i in ttym; do touch ./"$i"; done
# - tty (5,*)
for i in $ALL; do touch ./"tty$i"; done
# - pty master (6,*)
for i in ptmx; do touch ./"$i"; done
# - serial (7,*)
for i in $ALL; do touch ./"ttyS$i"; done
#   TODO: should we do com* as well?
# - windows (12,*)
for i in windows; do touch ./"$i"; done

# - floppy (17,0..15)
for i in 0 1 2; do touch ./"fd$i"; done
# - cdrom (17,16..31)
for i in 0 1 2; do touch ./"scd$i"; done
# - hard disks (17,32..223)
for j in a b c; do for i in "" 1 2; do touch ./"sd$j$i"; done; done
# - tape [rewind] (18,0..127)
for i in 0 1 2; do touch ./"st$i"; done
# - tape [norewind] (18,128..255)
for i in 0 1 2; do touch ./"nst$i"; done

# - null (19,*)
for i in null; do touch ./"$i"; done
# - zero (20,*)
for i in zero; do touch ./"$i"; done
# - random (21,*)
for i in random urandom; do touch ./"$i"; done
# - mem (22,*)
for i in mem port; do touch ./"$i"; done
# - clipboard (23,*)
for i in clipboard; do touch ./"$i"; done
# - dsp (24,*)
for i in dsp; do touch ./"$i"; done

# Create pipes
for i in pipe piper pipew; do touch ./"$i"; done
# Create sockets
for i in tcp udp streamsocket dgsocket; do touch ./"$i"; done

# Create symbolic links
[ ! -e console ] && ln -s tty ./console
[ ! -e floppy ]  && ln -s fd0 ./floppy
[ ! -e cdrom ]   && ln -s scd0 ./cdrom
[ ! -e tape ]    && ln -s st0 ./tape
[ ! -e audio ]   && ln -s dsp ./audio


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: window image capture how
@ 2004-01-13 14:24 Dawson, David W
  0 siblings, 0 replies; 9+ messages in thread
From: Dawson, David W @ 2004-01-13 14:24 UTC (permalink / raw)
  To: cygwin-xfree

I realize that this is an *X-Free* ailing list, but it also is
a Cygwin list, and Cygwin is hosted on MS Windows, so...

Why not just use Alt-PrintScreen to copy the image to the "winxp
clipboard"
then paste into Paint, Word, or any other image/bitmap program to print?

	-D.
---------------------
David Dawson
Lockheed Martin Maritime Systems & Sensors
david.w.dawson@lmco.com
703-367-3885

-----Original Message-----
From: cygwin-xfree-owner@cygwin.com
[mailto:cygwin-xfree-owner@cygwin.com] On Behalf Of Alexander Gottwald
Sent: Tuesday, January 13, 2004 9:02 AM
To: cygwin-xfree@cygwin.com; haisam@ido.org
Subject: Re: window image capture how


On Tue, 13 Jan 2004, Haisam K. Ido wrote:

> How can one capture an image of cygwin window into a winxp clipboard
and
> then print/edit etc?

xwd -display :0.0 | convert - /tmp/root.gif

This requires ImageMagic to be installed. The cursor changes into a
cross
and you can click on the window you want to capture.

For further features of xwd see man xwd.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-01-14 16:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13 12:25 window image capture how Haisam K. Ido
2004-01-13 14:01 ` Alexander Gottwald
2004-01-13 14:48 ` Haisam K. Ido
2004-01-13 15:21   ` Alexander Gottwald
2004-01-13 19:28     ` Haisam K. Ido
2004-01-14 12:21       ` Alexander Gottwald
2004-01-14 16:14       ` Igor Pechtchanski
2004-01-13 14:59 ` Igor Pechtchanski
2004-01-13 14:24 Dawson, David W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).