增加PIL中的RGB强度

时间:2016-02-16 12:51:43

标签: python colors python-imaging-library rgb imaging

我有一个图像,我可以导入我的终端并绘制成4个不同的图片,原始的,一个只有R,只有G,只有B显示。然而,我现在想要做的是能够增加仅1个色带的强度,例如G * 1.2(或者能够增加100个单位),然后能够在最后修改后将图像重新组合在一起。继续我到目前为止所拥有的:

from PIL import Image
im = Image.open('RedSunset.jpg')

#from _future_ import print_function
print(im.format, im.size, im.mode)

im.show()

rgbim = im.convert('RGB')
r, g, b = rgbim.split()
#im = Image.merge("RGB", (b, g, r)) #thinking of using this to put them back

b.show()
r.show()
g.show()

0 个答案:

没有答案