Java tutorial
//package com.java2s; import android.graphics.ImageFormat; public class Main { public static String translatePreviewFormat(int supportedPreviewFormat) { switch (supportedPreviewFormat) { case ImageFormat.JPEG: return "ImageFormat.JPEG"; case ImageFormat.NV16: return "ImageFormat.NV16"; case ImageFormat.NV21: return "ImageFormat.NV21"; case ImageFormat.RAW10: return "ImageFormat.RAW10"; case ImageFormat.RAW_SENSOR: return "ImageFormat.RAW_SENSOR"; case ImageFormat.RGB_565: return "ImageFormat.RGB_565"; case ImageFormat.UNKNOWN: return "ImageFormat.UNKNOWN"; case ImageFormat.YUV_420_888: return "ImageFormat.YUV_420_888"; case ImageFormat.YUY2: return "ImageFormat.YUY2"; case ImageFormat.YV12: return "ImageFormat.YV12"; default: return "xxxxxxxxdefault"; } } }