# Save an image from display window coordinates

**URL:** https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610
**Category:** Coding Questions
**Created:** [October 18, 2018, 5:29pm UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610 "2018-10-18T17:29:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Tex](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Daniel\_Tex](https://discourse.processing.org/u/Daniel_Tex)
#### Post date: [October 18, 2018, 5:29pm UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610/1 "2018-10-18T17:29:07Z")

</div>

How to save an image from the display window within coordinates? (Such as x \> 0 && x \< 100 && y \> 100 && y \< 200).

---

<div class="post-metadata">

### Author: ![tony](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tony/32/949_2.png) [@tony](https://discourse.processing.org/u/tony)
#### Post date: [October 18, 2018, 7:20pm UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610/2 "2018-10-18T19:20:50Z")

</div>

Check out the get() and save() functions

---

<div class="post-metadata">

### Author: ![ant](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@ant](https://discourse.processing.org/u/ant)
#### Post date: [October 18, 2018, 8:01pm UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610/3 "2018-10-18T20:01:49Z")

</div>

[https://processing.org/reference/save\_.html](https://processing.org/reference/save_.html)  
Follow the examples from the processing reference.

---

<div class="post-metadata">

### Author: ![Daniel\_Tex](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Daniel\_Tex](https://discourse.processing.org/u/Daniel_Tex)
#### Post date: [October 18, 2018, 9:06pm UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610/4 "2018-10-18T21:06:04Z")

</div>

That would save the whole display screen, I only want to save within the coordinates.

---

<div class="post-metadata">

### Author: ![ant](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@ant](https://discourse.processing.org/u/ant)
#### Post date: [October 19, 2018, 12:54am UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610/5 "2018-10-19T00:54:25Z")

</div>

As Tony said, that’s where the get() function comes in play to get a certain section of an image.  
[https://processing.org/reference/get\_.html](https://processing.org/reference/get_.html)
