• Re: XQueryColor() failing on dual monitor system

    From Marco Moock@21:1/5 to All on Fri Oct 27 11:59:15 2023
    XPost: comp.unix.programmer

    Am 27.10.2023 um 09:18:08 Uhr schrieb Muttley@dastardlyhq.com:

    I'm hoping to write some code to save the contents of a window
    clicked on by the mouse to a file and my plan was to get its image,
    save the pixels then reload them into an image created by
    XCreateImage.

    Why don't use xwd to save the image of a window?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@dastardlyhq.com on Fri Oct 27 13:52:23 2023
    XPost: comp.unix.programmer

    Muttley@dastardlyhq.com writes:
    Hi

    I'm hoping to write some code to save the contents of a window clicked on by >the mouse to a file

    $ man 1 xwd


    and my plan was to get its image, save the pixels then
    reload them into an image created by XCreateImage.

    $ man 1 convert (from the ImageMagick package)

    I'd look at the sources for xwd (part of the X11 distribution)
    to see how they handled the colormaps and/or direct color.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@dastardlyhq.com@21:1/5 to Marco Moock on Fri Oct 27 14:51:50 2023
    XPost: comp.unix.programmer

    On Fri, 27 Oct 2023 11:59:15 +0200
    Marco Moock <mm+usenet-es@dorfdsl.de> wrote:
    Am 27.10.2023 um 09:18:08 Uhr schrieb Muttley@dastardlyhq.com:

    I'm hoping to write some code to save the contents of a window
    clicked on by the mouse to a file and my plan was to get its image,
    save the pixels then reload them into an image created by
    XCreateImage.

    Why don't use xwd to save the image of a window?

    Because I'm saving more than just the image of a window and I don't like
    using system() or popen() to fork a utility that may or may not be available.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)