Set Height and Width of Display Area using Variables?

Is it possible to first load an image, and then use the height and width of the loaded image to specify the height and width of the Processing canvas? Every example I see already knows the needed canvas height and width in advance and sets it using known integers in the size() command.

2 Likes