I know the subject was on the board many times, but i can not get it work anyhow... I want to save view frames from preview to jpeg files. It looks more or less(code is simp
In order to avoid degraded JPEG image on the output (e.g. with interleaving green/red spots), you need to flush and close FileOutputStream
FileOutputStream filecon = new FileOutputStream(file);
image.compressToJpeg(
new Rect(0, 0, image.getWidth(), image.getHeight()), 90,
filecon);
filecon.flush();
filecon.close();