diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py index 24f6a3b6b..008ec0238 100644 --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -88,12 +88,8 @@ def autocontrast(image, cutoff=0, ignore=None): h[ix] = 0 if cutoff: # cut off pixels from both ends of the histogram - if isinstance(cutoff, int): + if not isinstance(cutoff, tuple): cutoff = (cutoff, cutoff) - elif isinstance(cutoff, tuple): - pass - else: - raise ValueError("the cutoff can only be a integer or tuple") # get number of pixels n = 0 for ix in range(256):