{
	"blend": {
		"body": [
			"blend(${1:srcImage}, ${2:sx}, ${3:sy}, ${4:sw}, ${5:sh}, ${6:dx}, ${7:dy}, ${8:dw}, ${9:dh}, ${10:blendMode})"
		],
		"description": "Copies a region of pixels from one image to another, using a specified blend mode to do the operation.",
		"prefix": "blend"
	},
	"copy": {
		"body": [
			"copy(${1:srcImage}, ${2:sx}, ${3:sy}, ${4:sw}, ${5:sh}, ${6:dx}, ${7:dy}, ${8:dw}, ${9:dh})"
		],
		"description": "Copies a region of pixels from one image to another. If no srcImage is specified this is used as the source. If the source and destination regions aren't the same size, it will automatically resize source pixels to fit the specified target region.",
		"prefix": "copy"
	},
	"filter": {
		"body": [
			"filter(${1:operation}, ${2:value})"
		],
		"description": "Applies an image filter to a p5.Image",
		"prefix": "filter"
	},
	"get": {
		"body": [
			"get(${1:[x]}, ${2:[y]}, ${3:[w]}, ${4:[h]})"
		],
		"description": "Get a region of pixels from an image. If no params are passed, those whole image is returned, if x and y are the only params passed a single pixel is extracted if all params are passed a rectangle region is extracted and a p5.Image is returned. Returns undefined if the region is outside the bounds of the image",
		"prefix": "get"
	},
	"height": {
		"body": [
			"height"
		],
		"description": "Image height.",
		"prefix": "height"
	},
	"loadPixels": {
		"body": [
			"loadPixels()"
		],
		"description": "Loads the pixels data for this image into the [pixels] attribute.",
		"prefix": "loadPixels"
	},
	"mask": {
		"body": [
			"mask(${1:srcImage})"
		],
		"description": "Masks part of an image from displaying by loading another image and using it's alpha channel as an alpha channel for this image.",
		"prefix": "mask"
	},
	"pixels[]": {
		"body": [
			"pixels[]"
		],
		"description": "Array containing the values for all the pixels in the display window. These values are numbers. This array is the size (include an appropriate factor for pixelDensity) of the display window x4, representing the R, G, B, A values in order for each pixel, moving from left to right across each row, then down each column. Retina and other high denisty displays may have more pixels[] (by a factor of pixelDensity^2). For example, if the image is 100x100 pixels, there will be 40,000. With pixelDensity = 2, there will be 160,000. The first four values (indices 0-3) in the array will be the R, G, B, A values of the pixel at (0, 0). The second four values (indices 4-7) will contain the R, G, B, A values of the pixel at (1, 0). More generally, to set values for a pixel at (x, y): var d = pixelDensity; for (var i = 0; i \u003c d; i++) {   for (var j = 0; j \u003c d; j++) {     // loop over     idx = 4 * ((y * d + j) * width * d + (x * d + i));     pixels[idx] = r;     pixels[idx+1] = g;     pixels[idx+2] = b;     pixels[idx+3] = a;   } }   Before accessing this array, the data must loaded with the loadPixels() function. After the array data has been modified, the updatePixels() function must be run to update the changes.",
		"prefix": "pixels[]"
	},
	"resize": {
		"body": [
			"resize(${1:width}, ${2:height})"
		],
		"description": "Resize the image to a new width and height. To make the image scale proportionally, use 0 as the value for the wide or high parameter. For instance, to make the width of an image 150 pixels, and change the height using the same proportion, use resize(150, 0).",
		"prefix": "resize"
	},
	"save": {
		"body": [
			"save(${1:filename}, ${2:extension})"
		],
		"description": "Saves the image to a file and force the browser to download it. Accepts two strings for filename and file extension Supports png (default) and jpg.",
		"prefix": "save"
	},
	"set": {
		"body": [
			"set(${1:x}, ${2:y}, ${3:a})"
		],
		"description": "Set the color of a single pixel or write an image into this p5.Image. Note that for a large number of pixels this will be slower than directly manipulating the pixels array and then calling updatePixels().",
		"prefix": "set"
	},
	"updatePixels": {
		"body": [
			"updatePixels(${1:x}, ${2:y}, ${3:w}, ${4:h})"
		],
		"description": "Updates the backing canvas for this image with the contents of the [pixels] array.",
		"prefix": "updatePixels"
	},
	"width": {
		"body": [
			"width"
		],
		"description": "Image width.",
		"prefix": "width"
	}
}