public void flipVertical() {
		byte image[] = new byte[width * height];
		int off = 0;
		for (int j = height - 1; j >= 0; j--) {
			for (int k = 0; k < width; k++) {
				image[off++] = pixels[k + j * width];
			}
		}
		pixels = image;
		offsetY = trimHeight - height - offsetY;
	}