cordova-mirtech-plugin-base64saveimage

This plugin allows you to save the contents of an HTML canvas tag to the iOS Photo Library, or Android Gallery from your app.

Usage no npm install needed!

<script type="module">
  import cordovaMirtechPluginBase64saveimage from 'https://cdn.skypack.dev/cordova-mirtech-plugin-base64saveimage';
</script>

README

Base64SaveImage

This plugin(based on devgeeks/Canvas2ImagePlugin) allows you to save BASE64 data to the iOS Photo Library, Android Gallery or WindowsPhone 8 Photo Album from your app.

This plugin fork from solderzzc/Base64SaveImage

Usage:

Call the window.Base64SaveImage.saveImageDataToLibrary() method using success and error callbacks and the id attribute or the element object of the canvas to save:

Example

function onDeviceReady()
{
    window.Base64SaveImage.saveImageDataToLibrary(
        function(msg){
            console.log(msg);
        },
        function(err){
            console.log(err);
        },
        BASE64DATA
    );
}