I need to use javascript to create an image file on my local computer a .png or .jpg etc file, I have the base 64 of the image, can this be done?
            Asked
            
        
        
            Active
            
        
            Viewed 359 times
        
    1
            
            
        - 
                    please check this : https://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file – Sandeep Feb 16 '16 at 12:23
2 Answers
3
            Yes you can do it. All you need is:
var img = new Image();
img.src = 'data:image/gif;base64,...';
document.body.appendChild(img);
 
    
    
        Przemek
        
- 803
- 4
- 15
0
            
            
        In Nodejs, create a buffer with base64 encoding and write the buffer to the file
 
    
    
        Community
        
- 1
- 1
 
    
    
        Gaurav Tendolkar
        
- 3
- 3
