private byte[] preprocess(byte[] preview, int width, int height) {
byte[] jpeg = null;
YuvImage image = new YuvImage(preview, ImageFormat.NV21, width, height, null);
Rect r = new Rect(0, 0, width, height);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
boolean ok = image.compressToJpeg(r, 100, baos);
if (ok) {
jpeg = baos.toByteArray();
}
return jpeg;
}
TcpClient.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:driverless-rccar
作者:
评论列表
文章目录