一维byte数组旋转

android`s camera can callback the video source by byte[] module.

sometimes we need to totate the image in a prerequisite for knowing the width and height .

Like this:

		 byte[] rotateImage =new byte[length];
		 int width =size.width;
		 int height = size.height;
		
		 for (int i = 0; i < width; i++) {
			 for (int j = 0; j < height; j++) {
				 rotateImage[height*i+j] = data[width*j+i];
			 }
		 }


你可能感兴趣的:(一维byte数组旋转)