

DNG filesĭNG, or ‘Digital NeGative’, files are quite different from PNG files. PNG does not support a quality parameter. Note that it’s necessary to specify the -e option to get a PNG file – changing the file name on its own is not enough. To save a PNG file, you’ll need to tell libcamera-still that you want to use a different encoder using the -e or -encoder parameter, like this: On the downside, PNG files are normally larger than JPEG files, and they are harder work to create, which takes longer. PNG is a lossless compression format, meaning that you are guaranteed to be able to recover exactly the same image that you started from (unlike JPEG).

PNG (or ‘Portable Network Graphic’) is another file and compression format which enjoys wide support. To save a JPEG at a different quality level, use the -q (or equivalently -quality) parameter like this:Įxperiment with quality values like 10 and 50 to see what you get! PNG files The quality factor ranges from 1 to 99, and if you don’t give one it will choose the value 93, which equates informally to ‘quite high quality’. At very low values your image will indeed deteriorate, but at very high values the JPEG process will be visually lossless that is, it really will look as good as the original camera image. In return, you get to specify a quality factor indicating how much compression you want. JPEG is a lossy compression format, meaning that the result of loading your JPEG file is no longer identical to the image that you started from, though the differences are arranged to be ones that you will least notice. Usually, JPEG files are given the extension. The default file format used by libcamera-still is JPEG because of the very wide support that it has, combined with a useful level of compression.

Images are normally encoded in some way (often they are compressed so that they aren’t so large) and then saved to a standard file format on the disk. Autofocus is available on Raspberry Pi Camera Module 3, enabling you to focus in on specific parts of an image Image encoders and file formats
