docs: function _rotateToOrientaion(width, height, orientation) {
  			switch (orientation) {
  				case 5:
  				case 6:
  				case 7:
  				case 8:
  					_canvas.width = height;
  					_canvas.height = width;
  					break;
  				default:
  					_canvas.width = width;
  					_canvas.height = height;
  			}
  
  			/**
  			1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.
  			2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.
  			3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.
  			4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.
  			5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.
  			6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.
  			7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.
  			8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.
  			*/
  
  			var ctx = _canvas.getContext('2d');
  			switch (orientation) {
  				case 2:
  					// horizontal flip
  					ctx.translate(width, 0);
  					ctx.scale(-1, 1);
  					break;
  				case 3:
  					// 180 rotate left
  					ctx.translate(width, height);
  					ctx.rotate(Math.PI);
  					break;
  				case 4:
  					// vertical flip
  					ctx.translate(0, height);
  					ctx.scale(1, -1);
  					break;
  				case 5:
  					// vertical flip + 90 rotate right
  					ctx.rotate(0.5 * Math.PI);
  					ctx.scale(1, -1);
  					break;
  				case 6:
  					// 90 rotate right
  					ctx.rotate(0.5 * Math.PI);
  					ctx.translate(0, -height);
  					break;
  				case 7:
  					// horizontal flip + 90 rotate right
  					ctx.rotate(0.5 * Math.PI);
  					ctx.translate(width, -height);
  					ctx.scale(-1, 1);
  					break;
  				case 8:
  					// 90 rotate left
  					ctx.rotate(-0.5 * Math.PI);
  					ctx.translate(-width, 0);
  					break;
  			}
  		}