a port of the Processing Visualization Language
Class PImage
Name

resize()

Examples
example pic
// @pjs preload must be used to preload the image
/* @pjs preload="jelly.jpg"; */
PImage img = loadImage("jelly.jpg");
image(img, 0, 0);
img.resize(100, 50);
image(img, 0, 0)
example pic
// @pjs preload must be used to preload the image
/* @pjs preload="jelly.jpg"; */
PImage img = loadImage("jelly.jpg");
image(img, 0, 0);
img.resize(0, 50);
image(img, 0, 0);
Description

Resize the image to a new width and height. To make the image scale proportionally, use 0 as the value for the wide or high parameter.

Syntax
img.resize(wide,high)
Parameters
img PImage: any variable of type PImage
wide int: the resized image width
high int: the resized image height
Returns void
Usage Web & Application
Related get()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub