Example usage for android.graphics ImageFormat YUY2

List of usage examples for android.graphics ImageFormat YUY2

Introduction

In this page you can find the example usage for android.graphics ImageFormat YUY2.

Prototype

int YUY2

To view the source code for android.graphics ImageFormat YUY2.

Click Source Link

Document

YCbCr format used for images, which uses YUYV (YUY2) encoding format.

Usage

From source file:Main.java

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:// ww  w. j av  a2s  .  co  m
        return "xxxxxxxxdefault";
    }
}