Skip to content

Commit

Permalink
patch for python-picamera library to add the new greyworld AWB mode
Browse files Browse the repository at this point in the history
until this PR gets merged: waveform80/picamera#576
  • Loading branch information
popoviciri committed Aug 15, 2019
1 parent c596c87 commit 0bcd7c0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions package/python-picamera/0001-enable-awb-greyworld-mode.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/picamera/camera.py b/picamera/camera.py
index 36b1202..a7da186 100644
--- a/picamera/camera.py
+++ b/picamera/camera.py
@@ -274,6 +274,7 @@ class PiCamera(object):
'incandescent': mmal.MMAL_PARAM_AWBMODE_INCANDESCENT,
'flash': mmal.MMAL_PARAM_AWBMODE_FLASH,
'horizon': mmal.MMAL_PARAM_AWBMODE_HORIZON,
+ 'greyworld': mmal.MMAL_PARAM_AWBMODE_GREYWORLD,
}

IMAGE_EFFECTS = {
diff --git a/picamera/mmal.py b/picamera/mmal.py
index 81b059f..82b2b5f 100644
--- a/picamera/mmal.py
+++ b/picamera/mmal.py
@@ -692,7 +692,8 @@ MMAL_PARAM_AWBMODE_T = ct.c_uint32 # enum
MMAL_PARAM_AWBMODE_INCANDESCENT,
MMAL_PARAM_AWBMODE_FLASH,
MMAL_PARAM_AWBMODE_HORIZON,
-) = range(10)
+ MMAL_PARAM_AWBMODE_GREYWORLD,
+) = range(11)
MMAL_PARAM_AWBMODE_MAX = 0x7fffffff

class MMAL_PARAMETER_AWBMODE_T(ct.Structure):

0 comments on commit 0bcd7c0

Please sign in to comment.