在我的情况我没有使用RenderSurfaceView。 我想利用我的场景的屏幕截图。 但是,当我保存的屏幕截图它显示倒挂镜像。 无法理解什么即时做错了什么。
这里是我的代码
attachChild(screenCapture);
share_clicked = 1;
final int viewWidth = (int)camera.getWidth();
final int viewHeight = (int)camera.getHeight();
Log.d("camera width", "View width :" + viewWidth);
Log.d("camera height", "View height :" + viewHeight);
File direct = new File(
Environment.getExternalStorageDirectory()
+ "/Word");
if (!direct.exists()) {
if (direct.mkdir())
; // directory is created;
}
screenCapture.capture(
viewWidth,
viewHeight,
direct.getAbsolutePath() + "/word"
+ System.currentTimeMillis() + ".png",
new IScreenCaptureCallback() {
public void onScreenCaptured(
final String pFilePath) {
activity
.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(
activity,
"Image Successfully saved to 'Word' folder in SD Card.",
Toast.LENGTH_SHORT)
.show();
}
});
}
public void onScreenCaptureFailed(
final String pFilePath,
final Exception pException) {
activity.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(
activity,
"Failed saving the image! Please check SD card.",
Toast.LENGTH_SHORT)
.show();
}
});
}
});
![这是屏幕截图我得到1
这将是一个很大的帮助,如果任何人都可以寻求这一点对我来说。 谢谢。