files.ensureDir(debug_images_dir);
}
//从存储中读取系数
var storage = storages.create("org.autojs.wxjumping");
press_coefficient = storage.get("press_coefficient", press_coefficient);
//让用户输入系数
press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
storage.put("press_coefficient", press_coefficient);

}

function save_result(im, result){
importPackage(android.graphics);
var bmp = im.getBitmap();
var canvas = new Canvas(bmp);
var paint = new Paint();
paint.setStyle(Paint.Style.FILL);
paint.setColor(colors.rgb(255, 0, 0));
drawCircle(canvas, result.piece, paint);
paint.setColor(colors.rgb(0, 255, 0));
drawCircle(canvas, result.board, paint);
var out = new java.io.FileOutputStream(files.join(debug_images_dir, new Date().getTime() + ".png"));
bmp.compress(Bitmap.CompressFormat.PNG, 100, out);
}

function drawCircle(canvas, point, paint){
canvas.drawCircle(point.x, point.y, 8, paint);
}