TcpClient.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:driverless-rccar 作者:
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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号