Documentation: Crop


Crops the image to the supplied rectangular area. It does not touch the CSS dimensions of the image, so you might need to take care of resizing the image yourself. It has no special parameters of its own but instead uses the general "rect" parameter to determine the area to be cropped.


Example usage

var img = new Image();
img.onload = function() {
	Pixastic.process(img, "crop", {
		rect : {
			left : 50, top : 50, width : 50, height : 50
img.src = "myimage.jpg";


This action has no parameters.

View source: crop.js

Browser support