glenn-jocher commited on
Commit
2181ef3
·
unverified ·
1 Parent(s): 8d0291f

Update `cv2.imread()` patch with flags argument (#7287)

Browse files
Files changed (1) hide show
  1. utils/general.py +2 -2
utils/general.py CHANGED
@@ -925,8 +925,8 @@ def increment_path(path, exist_ok=False, sep='', mkdir=False):
925
  imshow_ = cv2.imshow # copy to avoid recursion errors
926
 
927
 
928
- def imread(path):
929
- return cv2.imdecode(np.fromfile(path, np.uint8), cv2.IMREAD_COLOR)
930
 
931
 
932
  def imwrite(path, im):
 
925
  imshow_ = cv2.imshow # copy to avoid recursion errors
926
 
927
 
928
+ def imread(path, flags=cv2.IMREAD_COLOR):
929
+ return cv2.imdecode(np.fromfile(path, np.uint8), flags)
930
 
931
 
932
  def imwrite(path, im):