# Resize and image -\> cropping

**URL:** <https://discourse.processing.org/t/resize-and-image-cropping/38255>\
**Category:** Libraries\
**Created:** [August 6, 2022, 7:20pm UTC](https://discourse.processing.org/t/resize-and-image-cropping/38255 "2022-08-06T19:20:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishback](https://avatars.discourse-cdn.com/v4/letter/i/d9b06d/32.png) [@ishback](https://discourse.processing.org/u/ishback)\
**Post date:** [August 6, 2022, 7:20pm UTC](https://discourse.processing.org/t/resize-and-image-cropping/38255/1 "2022-08-06T19:20:01Z")

</div>

Hi, I’m trying to resize a video before displaying it.  
The original video is 100x200px.  
 ![Screen Shot 2022-08-06 at 3.14.15 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/5/65c2f7d25be9319bd7a5e881ceb3ca211239f28b.png)

If I resize to 100x100px it crops the top part, looks good.  
 ![Screen Shot 2022-08-06 at 3.14.03 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/6/f673928d019efe6bc7824566214a65e38299deed.png)

If I resize to 50x100px (50% proportionally for each dimension), it crops one part instead of resizing and it looks it’s doing some interlacing.  
 ![Screen Shot 2022-08-06 at 3.13.38 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/9/29b22b07d0c5bba108d599a51fc2db5c0e424553.png)

Why is cropping instead of resizing, and what can this interlacing effect be due to?

That’s the code:

```auto
import processing.video.*;
Movie movie;

void setup() {
  size(320, 640);
  noStroke();
  noSmooth();
  movie = new Movie(this, "waves3.mp4");
  movie.loop();
}

void movieEvent(Movie m) {
  m.read();
  m.resize(50, 100);
}

void draw() {
  background(0);
  movie.resize(50, 100);
  image(movie, 0, 0);
}

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 6, 2022, 11:10pm UTC](https://discourse.processing.org/t/resize-and-image-cropping/38255/2 "2022-08-06T23:10:06Z")

</div>

Hello @ishback,

See reference and syntax:  
[https://processing.org/reference/image\_.html](https://processing.org/reference/image_.html)

Example:

`image(movie, 0, 0, width/2, height/2);`

You can also do some pixel manipulation for other desired effects:  
[https://processing.org/tutorials/video](https://processing.org/tutorials/video)  
[https://processing.org/tutorials/pixels](https://processing.org/tutorials/pixels)

A search revealed this:  
[https://forum.processing.org/two/discussion/23389/resizing-a-movie-possible-bug.html](https://forum.processing.org/two/discussion/23389/resizing-a-movie-possible-bug.html)

I did not explore further…

`:)`
