我试图从HTML5canvas将图像(JPEG)保存到桌面.我可以在新窗口中打开window.open(canvas.toDataURL('png'), "");,但如何将其保存到桌面?谢谢.
protected class saveBtnClickHandler implements OnClickListener{
@Override
public void onClick(View v) {
String jsonRest = loadJsonDataFromURL("http://thirddhaba.appspot.com/api/v1/circle/condensed/data/?circle_id=1");
try {
JSONObject jsonObj = new JSONObject(jsonRest);
} catch (JSONException e) {
android.util.Log.e("JSON Parser", "Error parsing data " + e.toString());
}
}
}
protected String loadJsonDataFromURL(String url){
String jsonStr = null;
try {
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(new HttpGet(url));
StatusLine statusLine = response.getStatusLine();
if(statusLine.getStatusCode() == HttpStatus.SC_OK){
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.getEntity().writeTo(out);
out.close();
jsonStr = out.toString();
} else{
//Closes the connection. …Run Code Online (Sandbox Code Playgroud) 如何在flex中使用数学模型函数?
如此计算7 mod(%)2 = 1任何帮助
android ×1
apache-flex ×1
canvas ×1
html5 ×1
html5-canvas ×1
javascript ×1
json ×1
jsonobject ×1