public void resize() {
		int image[] = new int[trimWidth * trimHeight];
		for (int offY = 0; offY < height; offY++) {
			for (int offX = 0; offX < width; offX++) {
				image[(offY + offsetY) * trimWidth + (offX + offsetX)] = pixels[offY * width + offX];
			}
		}
		pixels = image;
		width = trimWidth;
		height = trimHeight;
		offsetX = 0;
		offsetY = 0;
	}