Skip to content

Commit 4a8e2b6

Browse files
committed
Allow quality=2 again
This works, but only at some resolutions. Needs more exploration.
1 parent cbb5d2f commit 4a8e2b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_ov5640.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,14 +1165,14 @@ def effect(self, value):
11651165

11661166
@property
11671167
def quality(self):
1168-
"""Controls the JPEG quality. Valid range is from 5..55 inclusive"""
1168+
"""Controls the JPEG quality. Valid range is from 2..55 inclusive"""
11691169
return self._read_register(_COMPRESSION_CTRL07) & 0x3F
11701170

11711171
@quality.setter
11721172
def quality(self, value: int):
1173-
if not 5 <= value < 55:
1173+
if not 2 <= value < 55:
11741174
raise ValueError(
1175-
f"Invalid quality value {value}, use a value from 5..55 inclusive"
1175+
f"Invalid quality value {value}, use a value from 2..55 inclusive"
11761176
)
11771177
self._write_register(_COMPRESSION_CTRL07, value & 0x3F)
11781178

0 commit comments

Comments
 (0)