g.js — graphical objects for JavaScript

posterizeposterize

Posterize an image.

var i = g.import('butterfly.jpg');
g.posterize(i, 4);

Parameters

  • image: The input image.
  • levels: The number of levels in each RGB channel.