UIImage Saving image with file name on the iPhone

Kenny, you had the answer! For illustration I always think code is more helpful. //I do this in the didFinishPickingImage:(UIImage *)img method NSData* imageData = UIImageJPEGRepresentation(img, 1.0); //save to the default 100Apple(Camera Roll) folder. [imageData writeToFile:@”/private/var/mobile/Media/DCIM/100APPLE/customImageFilename.jpg” atomically:NO];

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