Forums > Jitter

How to keep proportions in full screen mode?

Dec 15 2013 | 12:19 pm

Hi everyone!

I am trying to project an image (using When I enable full screen, the image stretches to fit the screen. I’m wondering what is the best way to preserve the proportions of the image so it’s not distorted? Black or white bars on the sides would work. I am (clearly) new to Max and I’ve been looking through the forums but I can’t find an answer to this question.

Thank you!

Dec 15 2013 | 5:01 pm

I suggest to:
1) Use jit.displays to determine the width and height of the display where you want to see the movie fullscreen.
2) Set the size of your jit.window those dimensions.
and then either
3) Compare those dimensions to the dimensions of the movie you want to show.
4) Scale your movie by that ratio.
5) Center it in the jit.window.
3) Get the dimensions of your movie.
4) Use those dimensions to scale a to the proper aspect ratio and dimensions to fill the window.
5) Project your video onto the videoplane and render it.

Dec 16 2013 | 11:08 am

easiest is @preserve_aspect 1:

-- Pasted Max Patch, click to expand. --


Dec 16 2013 | 2:23 pm

Yes. Good example. Thx.

Dec 17 2013 | 6:58 pm

Thanks so much for your suggestions!

For some reason I’m not understanding how to use the, though it seems like it should work. Is it because I am not using opengl? My patch is just using jit.xfade to fade from one image (not a video but a still image though I am using to another based on volume from sound input. Its pretty simple. I tried connecting to my but it either does nothing,or, if I use the piece of code Ramirez sent, it glitches. Sorry I’m unable to be more articulate about what I’m doing. Do either of you know what I might be doing wrong?

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter