[PYTHON IMAGE-SIG] Image docs

Tamminen Eero t150315@proffa.cc.tut.fi
Mon, 6 May 1996 14:56:45 +0200 (EET DST)


> 	# adjust polarity (0=black, 255=white)
> 	im = im.point(map(lambda a: 255 - (255 * a / 64), range(256))
> 
> 	# PIL 0.1 allows you to write:
> 	# im = im.point(lambda a: 255 - (255 * a / 64))
> 
> Better would of course be to write a real file format handler;

IMHO this kind of stuff would be nice to have as a PIL function,
done in C for speed. For those not in hurry there could be a
Python function for doing the same with floats ;-).


Does PIL have some kind of 'combine' function? For doing something
like this:
	result = (img_1 * 2 / 3) + (img_2 * 1 / 3)

Combining two 'full' images is mainly of use only for combining effects
(= modified versions of the image) to the original one, but might have
some use in combining completely different images too, if PIL would have
some functions for doing different color (intensity) 'slide' images that
can be used in combining to control how the two images are combined (eg.
img_1 gradually changes to img_2 while going from image top to bottom).
Circular slides might be nice in addition to vertical, horizontal and
diagonal ones too.

For combining some defined image parts one needs to do masks by hand. :-(
(on some rare cases threshold might suffice though)


	- Eero


=================
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
=================