레퍼런스 resize()

resize()

Resizes the image to a given width and height.

The image's original aspect ratio can be kept by passing 0 for either width or height. For example, calling img.resize(50, 0) on an image that was 500 × 300 pixels will resize it to 50 × 30 pixels.

예제

구문

resize(width, height)

매개변수

width
Number:

resized image width.

height
Number:

resized image height.

Notice any errors or typos? Please let us know. Please feel free to edit src/image/p5.Image.js and open a pull request!

관련 레퍼런스