xxxxxxxxxx
15
let catImg;
function preload() {
createCanvas ()
catImg = loadImage("dogs.jpeg");
}
function setup() {
createCanvas(563, 348);
background(255);
image(catImg, 0, 0);
// to crop a segment of the image using coordinates
let newImg = catImg.get( 100,60, 100,100);
image (newImg, 140.75, 113);
}