Android Camera Size Get getBiggestPictureSize( Camera.Parameters parameters)

Here you can find the source of getBiggestPictureSize( Camera.Parameters parameters)

Description

get Biggest Picture Size

License

Open Source License

Declaration

public static Camera.Size getBiggestPictureSize(
            Camera.Parameters parameters) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.hardware.Camera;

public class Main {
    public static Camera.Size getBiggestPictureSize(
            Camera.Parameters parameters) {
        Camera.Size result = null;/*w  w  w .j  a va  2s  . c o m*/

        for (Camera.Size size : parameters.getSupportedPictureSizes()) {
            if (result == null) {
                result = size;
            } else {
                int resultArea = result.width * result.height;
                int newArea = size.width * size.height;

                if (newArea > resultArea) {
                    result = size;
                }
            }
        }

        return (result);
    }
}

Related

  1. getSizeWIDTH(List sizes, int w, int h)
  2. getOptimalPreviewSize( List sizes, int w, int h)
  3. getOptimalPreviewSize(List sizes, int w, int h)
  4. getOptimalPreviewSize(List supportedSizes, int w, int h)
  5. getOptimalPreviewSize(int displayOrientation, int width, int height, Camera.Parameters parameters)
  6. toString(Iterable areas)
  7. getSmallestPictureSize( Camera.Parameters parameters)
  8. getUsefulSize(List sizes, int w, int h, int type)