프로그래밍/android2012. 11. 28. 10:33


   
private Camera.Size getPictureSize(int width, int height, Camera.Parameters parameters)
{
	ArrayList<Camera.Size> kSizes = new ArrayList<Camera.Size>();
		
	kSizes.addAll(parameters.getSupportedPictureSizes());
	
	Comparator<Camera.Size> kCompare = new Comparator<Camera.Size>()
	{
		@Override
		public int compare(Size lhs, Size rhs)
		{
			if (lhs.width == rhs.width)
				return 0;
			else
				return 1;
		}
	};
	
	Collections.sort(kSizes, kCompare);
	
	return kSizes.get(kSizes.size() - 1);
}


Posted by 쎄미

댓글을 달아 주세요