SaveAsPng and SaveAsJpeg for Android

Taken from #2115