Resize image processing crash

Hello !

does anyone know why on my code my image is not in the original format? I try to apply Resize but it does not work on my image? how can i resize it? it looks like she puts herself in a square

I just want my image to be at the original size, to appear in the center when there is sound

Thank you for your help !!


import [processing.video](https://processing.video/).*;

import processing.sound.*;

AudioIn micro;

Amplitude amp;

Movie movie;

PImage logo;

void setup() {

fullScreen ();

movie = new Movie(this, "gradient_low.mov");

movie.loop();

micro = new AudioIn(this, 0);

micro.start();

amp = new Amplitude(this);

amp.input(micro);

logo = loadImage("logoo.png");

[//logo.resize](https://logo.resize/)(590, 275);

}

void draw() {

//image(movie, 0, 0);

[//logo.resize](https://logo.resize/)(width, height);

//image(logo,width/2, height/2, amp.analyze() * 2550, amp.analyze() * 2550);

imageMode(CORNER);

image(movie,0,0);

imageMode(CENTER);

[//logo.resize](https://logo.resize/)(590, 275);

image(logo,width/2, height/2, amp.analyze() * 2550, amp.analyze() * 2550);

[//logo.resize](https://logo.resize/)(int(amp.analyze()) * 2550, 1004);

//image(logo,width/2, height/2);

//image(logo,width/2, height/2, amp.analyze() * 2550, amp.analyze() * 2550);

}

void movieEvent(Movie m) {

[m.read](https://m.read/)();

}

There is a lot going on in your sketch so first create a simple sketch that loads the logo image, resizes the image in setup and then displays it in draw.

If that works start adding things back in one at a time. Start with the video then the sound. If it didn’t work then perhaps the image file is corrupted.

Removing complexity will help track down the actual problem.

Do you mean this line?

image() with 5 parameters is always slower
than with 3.

Try with 3 parameters

Try resize in setup and not in draw() for testing