acatalano
Posts: 14
Joined: Mon Jun 22, 2015 1:49 pm
Location: Boulder, CO USA
Contact: Website

Picamera Code: How to Change JPEG Quality

Thu Dec 21, 2017 4:54 am

The documentation for picamera is quite extensive and excellent IMHO. It mentions that the jpeg quality can be changed (default is 85) but is not explicit in just how to do this. Can someone show the code to do this please?
Anthony Catalano, PhD
Boulder, CO USA
Weather Station & Webcam at:
www.apcat.org and...
http://www.wunderground.com/personal-weather-station/dashboard?ID=KCOBOULD194#history

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Picamera Code: How to Change JPEG Quality

Thu Dec 21, 2017 7:03 am

From what I can see in the docs, you just need to add an additional "quality" argument to the "capture" method eg

Code: Select all

camera.capture(output_filename, format="jpeg",
quality=60) 
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Return to “Python”