5
私の状況では私はRenderSurfaceViewを使用していません。私は自分のシーンのスクリーンキャプチャをしたい。 しかし、スクリーンショットを保存すると、鏡像が上下逆さまに表示されます。ここで何が間違っているのか理解できません。ここでandengineのスクリーンキャプチャは逆さまの鏡像を与えます
は私のコード
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
を取得するスクリーンショットです。おかげさまで このようなもののために
感謝。 – Siddharth
実際にはエラーがあり、pGrabYが0以外の場合はArrayOutOFBoundsExceptionが返されます。その行は、代入の2番目の部分にpGrabYを含まず、 'pixels [x +(pGrabHeight - y - 1)* pGrabWidth] = pixelsARGB_8888 [x + y * pGrabWidth]; – Orgmir