# Width (0) and height (0) cannot be \<= 0

**URL:** <https://discourse.processing.org/t/width-0-and-height-0-cannot-be-0/5459>\
**Category:** Libraries\
**Created:** [November 11, 2018, 9:43pm UTC](https://discourse.processing.org/t/width-0-and-height-0-cannot-be-0/5459 "2018-11-11T21:43:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [November 11, 2018, 10:47pm UTC](https://discourse.processing.org/t/width-0-and-height-0-cannot-be-0/5459/4 "2018-11-11T22:47:00Z")

</div>

> [@Problem with slitscan effect for pre-recorded video](https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456/2):
>
> The video library takes some time to “ignite” after we issue a “play” command. Until then, its width & height dimensions are still 0! As a workaround, we can delay() inside setup() until the video is fully ready. This way, when draw() is called back for the 1st time, we’re safe to access the video. void setup() { // ... ( myMovie = new Movie(this, "kat.mov") ).loop(); while (myMovie.height == 0) delay(2); }

---

_[View the full topic](https://discourse.processing.org/t/width-0-and-height-0-cannot-be-0/5459)._
