# Open Source Programming

# Author : S.Ganesh Babu

# Program: Manipulating Pixels

import Image

im=Image.open('c:/new.tif')

# multiply each pixels by 1.5

out=im.point(lambda i: i*1.5)

out.show(out)

# multiply each pixels by 0.5

out=im.point(lambda i: i*0.5)

out.show(out)

# Open Source Programming

# Author : S.Ganesh Babu

# Program: Manipulating Pixels

import Image

im=Image.open('c:/new.tif')

# multiply each pixels by 1.5

out=im.point(lambda i: i*1.5)

out.show(out)

# multiply each pixels by 0.5

out=im.point(lambda i: i*0.5)

out.show(out)

## No comments:

Post a Comment