TypeError: 'tuple' object cannot be interpreted as an integer | Python Pillow

**I’ve got a problem, when I use the command. Problem is:
offset_img = ImageChops.offset(img, (1, 1))

TypeError: ‘tuple’ object cannot be interpreted as an integer**

My code:

        avatar = ctx.author.avatar.with_size(128)
        avt = BytesIO(await avatar.read())
        img = Image.open(avt)
        img = img.resize((400, 400))
        
        mask = Image.new('L', (400, 400), 0)
        radius = min(img.width // 2, img.height // 2)
        center = radius, radius
        draw = ImageDraw.Draw(mask)
        draw.ellipse((0, 0, radius * 2, radius * 2), fill=250)
        img.putalpha(mask)
        offset_img = ImageChops.offset(img, (1, 1))

        img.resize((400, 400))
        bank_card.paste(img, (326, 1710))
        width, height = bank_card.size
        draw = ImageDraw.Draw(bank_card)

Remove the parentheses around (1, 1), the documentation says it does not take a tuple, but two ints.

1 Like