List of usage examples for android.media CameraProfile QUALITY_HIGH
int QUALITY_HIGH
To view the source code for android.media CameraProfile QUALITY_HIGH.
Click Source Link
From source file:com.android.camera.manager.ThumbnailViewManager.java
private byte[] covertYuvDataToJpeg(byte[] data, int yuvWidth, int yuvHeight, int imageFormat) { byte[] jpeg;/*from w ww . j ava 2 s .c o m*/ Rect rect = new Rect(0, 0, yuvWidth, yuvHeight); // TODO: the yuv data from native must be NV21 or YUY2. YuvImage yuvImg = new YuvImage(data, imageFormat, yuvWidth, yuvHeight, null); ByteArrayOutputStream outputstream = new ByteArrayOutputStream(); int jpegQuality = CameraProfile.getJpegEncodingQualityParameter(CameraProfile.QUALITY_HIGH); yuvImg.compressToJpeg(rect, jpegQuality, outputstream); jpeg = outputstream.toByteArray(); return jpeg; }