Fixed methods SaveAsJpeg and SaveAsPng for Android and IOS