我是PhoneGap的新手,想知道如何在iOS中將照片保存到照片。通過PhoneGap在iOS中保存照片到PNG或JPG圖像
雖然我能夠使用
navigator.camera.getPicture
與選項
quality:50, destinationType:Camera.DestinationType.DATA_URL,saveToPhotoAlbum: true
保存用相機照片拍攝的照片,我現在正在試圖找出如何保存在 - 應用圖片轉爲照片。 「:; BASE64,圖像/ JPEG數據」 ...
<html>
<head>
<title>Save Image</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.1.0.js"></script>
<script type="text/javascript" charset="utf-8">
function savePicture(){
//this is where the magic would happen
//how can I save myPhoto to Photos?
//output imageData to a jpg or png file which would show up in Photos?
}
</script>
</head>
<body>
<button onclick="savePicture();">Save Photo</button> <br>
<input type="hidden" name="myPhoto" id="myPhoto" value="">
</body>
</html>
問:
又該savePicture其中元素myPhoto持有的圖象 - 科爾多瓦頁如 -
考慮下面的PhoneGap ()通過Phonegap將圖像數據從myPhoto保存到iOS中的照片?
我用你的代碼和程序但我無法獲得解決方案。你能幫我找出答案嗎? –
是的我得到解決方案..我得到了線程警告:插件應該使用CordovaInterface.getThreadPool()。 – Muthu