Learn Before
  • ImageChops Class (Pillow)

ImageChops Example (Pillow)

The below example adds the channel data values of two images together. It divides the resulting value by 1.0, as decided by the value for argument scale. Lastly, it adds a value of 2, as decided by the vlaue of the offset argument.

# Importing Image and ImageChops module from PIL package from PIL import Image, ImageChops # creating a image1 object im1 = Image.open(r"C:\Users\sadow984\Desktop\a2.PNG") # creating a image2 object im2 = Image.open(r"C:\Users\sadow984\Desktop\x5.PNG") # applying add method im3 = ImageChops.add(im1, im2, scale = 1.0, offset = 2) im3.show()

0

1

4 years ago

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science

Related
  • ImageChops Example (Pillow)

Learn After
  • Geeks For Geeks: Python PIL | ImageChops.add() method