how to save canvas as png image?

try this: var canvas = document.getElementById(“alpha”); var dataURL = canvas.toDataURL(“image/png”); var newTab = window.open(‘about:blank’,’image from canvas’); newTab.document.write(“<img src=”https://stackoverflow.com/questions/11112321/” + dataURL + “” alt=”from canvas”/>”); This shows image from canvas on new page, but if you have open popup in new tab setting it shows about:blank in address bar. EDIT:- though window.open(“<img src=”https://stackoverflow.com/questions/11112321/”+ canvas.toDataURL(“image/png’) +”‘/>”) does … Read more

android – save image into gallery

MediaStore.Images.Media.insertImage(getContentResolver(), yourBitmap, yourTitle , yourDescription); The former code will add the image at the end of the gallery. If you want to modify the date so it appears at the beginning or any other metadata, see the code below (Cortesy of S-K, samkirton): https://gist.github.com/samkirton/0242ba81d7ca00b475b9 /** * Android internals have been modified to store images in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)