I noticed today that if you apply filters or modify an image using the gallery application, it applies the changes to the image, rather than creating a new image with the changes. My first thought was that it was not a good idea. Sometimes you want to keep the original, untouched image, as well as the modified image, maybe for comparison purposes, or to try different filters or settings. In my case I was playing with the curves, and then I saved the image. I wanted to compare the new image with the original, but the original was gone. I decided to go back to the curves settings, and saw that the curves were still as I had set them, which means I can just restore the curve for each channel and that will give me back the original image.
I decided to do a test with another image. I opened a new image, applied a filter from the preset filters, and saved the image. Then I went back to the image, and edited it again, but this time I removed the filter, and the image was back to normal.
My first thought was that the gallery image applied non-destructive edits. Something similar to what some editing software does. The one that comes to mind is Shotwell, although this is more of a viewer than and editor, but it has some limited functionality to play around with the saturation, levels, and other settings. It didn't seem likely that the gallery application in adroid was doing that because other image viewing applications showed the image with the filter applied to it.
I decided to connect the device to the computer using a USB cable. I navigated to the camera folder, and opened the image in the computer, and it showed the modified image. This means that the image is being modified. While the devices was still connected to the computer, I decided to remove the filter, and open the image again in the computer. The image was back to original.
How is android able to modify the image file directly, and then restore it to original. Is it saving the original file somewhere else?
How to reproduce:
- Open the Gallery application (the default one)
- Chose an image to edit, and touch the little pencil on the lower
left corner of the screen.
- Edit your image, touch the save button, or just press the back
button. It will ask if you want to save the image. Save it.
- Touch the pencil again, remove the filter.
- Your image is back to original.
Device: Nexus 7
OS: Android 4.4.2