# Screenshots with package or cmd tool

**URL:** <https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158>\
**Category:** General Usage\
**Tags:** question, linux, cmd, io\
**Created:** [September 6, 2020, 7:17pm UTC](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158 "2020-09-06T19:17:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noroskir](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@noroskir](https://discourse.julialang.org/u/noroskir)\
**Post date:** [September 6, 2020, 7:17pm UTC](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158/1 "2020-09-06T19:17:22Z")

</div>

Hello there !

Is there a native Julia package to take a screenshot?  
Alternatively does anybody know if it is possible to read the output of  
a cmd tool like xwd ( X Window Dump ) directly into a Julia object ?

Thanks!

---

<div class="post-metadata">

**Author:** ![noroskir](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@noroskir](https://discourse.julialang.org/u/noroskir)\
**Post date:** [September 7, 2020, 9:57am UTC](https://discourse.julialang.org/t/screenshots-with-package-or-cmd-tool/46158/2 "2020-09-07T09:57:38Z")

</div>

If anyone else needs to know, this works under linux with the xwd tool:

```julia
using ImageMagick

function screenshot()
    data = read(pipeline(`xwd -root`, `convert xwd:- png:-`))
    im = ImageMagick.load_(data)
end

```
