Take a photo in PNG (or other lossless) format
If you really want to take lossless photographs, you should look for a camera app with RAW support. Typically, you would be working with a .dng file, instead of a .png file. RAW photos are lossless and uncompressed, which is what you're looking for, and (as the name suggests) captures the raw data from the camera's sensor.

The Lollipop Camera2 API includes a feature to capture RAW images, and there are at least a few popular apps that take advantage of this.


OpenCamera (Free, Open Source)
Manual Camera (try the compatibility checker app before buying)
Camera FV-5