g.js — graphical objects for JavaScript

cropcrop

Crop an image.

var i = g.import('butterfly.jpg');
g.crop(i, g.rect({x: 4, y: 0}, 170, 100));

Parameters

  • image: The input image.
  • bounding: The bounding rectangle of the cropped area.