android 获取的相机预览帧为什么是这个样子

processor.addPacketCallback(
"pose_landmarks",

            (packet) -> {
                Log.v(TAG, "Received Pose landmarks packet.");
                try {
                    System.out.println(packet);
                        byte[] landmarksRaw = PacketGetter.getProtoBytes(packet);
                    //byte[]转bitmap
                    YuvImage image = new YuvImage(landmarksRaw, ImageFormat.NV21, image_width, image_height, null);
                    ByteArrayOutputStream stream = new ByteArrayOutputStream();
                    image.compressToJpeg(new Rect(0, 0, image_width,image_height), 80, stream);
                    Bitmap bmp = BitmapFactory.decodeByteArray(stream.toByteArray(), 0, stream.size());
                    //因为图片会放生旋转,因此要对图片进行旋转到和手机在一个方向上
                    Bitmap bmp1 = rotateMyBitmap(bmp);
                    Bitmap bmp2 = turnCurrentLayer(bmp1, -1, 1);
                    FileUtils.savePaiZhaoBitmap(bmp2,landmarksRaw);
                ByteArrayOutputStream stream = new ByteArrayOutputStream();

                image.compressToJpeg(new Rect(0, 0, image_width,image_height), 80, stream);

                Bitmap bmp = BitmapFactory.decodeByteArray(stream.toByteArray(), 0, stream.size());

                Bitmap bmp1 = rotateMyBitmap(bmp);

这几句图片做了压缩的,旋转,是不是变形了

img

可能是图片格式不行导致的,换其他图片试试