# How do you expand a kinect's window to match the size of the canvas?

**URL:** https://discourse.processing.org/t/how-do-you-expand-a-kinects-window-to-match-the-size-of-the-canvas/10168
**Category:** Libraries
**Created:** [April 10, 2019, 7:44pm UTC](https://discourse.processing.org/t/how-do-you-expand-a-kinects-window-to-match-the-size-of-the-canvas/10168 "2019-04-10T19:44:12Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![zenemig](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/zenemig/32/4418_2.png) [@zenemig](https://discourse.processing.org/u/zenemig)
#### Post date: [April 13, 2019, 1:58am UTC](https://discourse.processing.org/t/how-do-you-expand-a-kinects-window-to-match-the-size-of-the-canvas/10168/4 "2019-04-13T01:58:14Z")

</div>

Im asuming you’re using the library I linked in the [other post](https://discourse.processing.org/t/how-can-i-link-multiple-kinects-in-one-processing-sketch/10169/3).  
If that is the case, the image you are getting from the Kinect and the size of the canvas are not conected, so there’s no chance of getting the kinect image automatically adjust its size to the windows/canvas size.

If you have something like this in your code:

```auto
image(kinect2.getDepthImage(), 0, 0);

```

It means that you are placing the kinect image, in its original size at 0 of x and 0 of y. So the kinect did’t care about your canvas size.

But if you have something like this:

```auto
image(kinect2.getDepthImage(), 0, 0, width, height);

```

That mean you’re adjusting the image you get from the kinect to the size of your windows/canvas.

---

_[View the full topic](https://discourse.processing.org/t/how-do-you-expand-a-kinects-window-to-match-the-size-of-the-canvas/10168)._
