	public static Bitmap fixOrientation(Bitmap bm, int currentOrientation)
	{
		switch (currentOrientation)
		{
			case 2:	
			{
				return flip(bm, FLIP_HORIZONTAL);
			}
			case 3:	
			{
				return rotate(bm, -180);
			}
			case 4:	
			{
				return flip(bm, FLIP_VERTICAL);
			}
			case 5:	
			{
				return rotate(flip(bm, FLIP_VERTICAL), 90);				
			}
			case 6:	
			{
				return rotate(bm, 90);
			}
			case 7:	
			{
				return rotate(flip(bm, FLIP_HORIZONTAL), 90);				
			}
			case 8:	
			{
				return rotate(bm, 90);				
			}
		}
		return bm;
	}

	public static Bitmap fixOrientation(Bitmap bm, int currentOrientation)
	{
		switch (currentOrientation)
		{
			case 2:
			{
				return flip(bm, FLIP_HORIZONTAL);
			}
			case 3:	
			{
				return rotate(bm, -180);
			}
			case 4:	
			{
				return flip(bm, FLIP_VERTICAL);
			}
			case 5:
			{
				return rotate(flip(bm, FLIP_VERTICAL), 90);				
			}
			case 6:	
			{
				return rotate(bm, 90);
			}
			case 7:	
			{
				return rotate(flip(bm, FLIP_HORIZONTAL), 90);				
			}
			case 8:	
			{
				return rotate(bm, 90);				
			}
		}
		return bm;
	}
