diff options
author | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1997-01-15 20:58:55 (GMT) |
---|---|---|
committer | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1997-01-15 20:58:55 (GMT) |
commit | 52a6ea7b7da652c19c5175be0c3717c51b33f79c (patch) | |
tree | dd1ff9644c3ea4a0ec1d971680bbfae3d6331dcf /Lib/test/test_imageop.py | |
parent | e17ec8d149238154888da2d128f90326fc70d3d2 (diff) | |
download | cpython-52a6ea7b7da652c19c5175be0c3717c51b33f79c.zip cpython-52a6ea7b7da652c19c5175be0c3717c51b33f79c.tar.gz cpython-52a6ea7b7da652c19c5175be0c3717c51b33f79c.tar.bz2 |
Opps. Added tests for the last two methods that were missing from
the test program: 'grey2rgb' and 'rgb2grey'
Diffstat (limited to 'Lib/test/test_imageop.py')
-rwxr-xr-x | Lib/test/test_imageop.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py index 327726d..fc8dadf 100755 --- a/Lib/test/test_imageop.py +++ b/Lib/test/test_imageop.py @@ -36,7 +36,7 @@ def main(use_rgbimg=1): print 'tovideo' videoimage = imageop.tovideo (image, 4, width, height) - # Convert an rgb image to an 8 bit rgb (greyscale) + # Convert an rgb image to an 8 bit rgb if verbose: print 'rgb2rgb8' greyimage = imageop.rgb2rgb8(image, width, height) @@ -46,6 +46,16 @@ def main(use_rgbimg=1): print 'rgb82rgb' image = imageop.rgb82rgb(greyimage, width, height) + # Convert an rgb image to an 8 bit greyscale image + if verbose: + print 'rgb2grey' + greyimage = imageop.rgb2grey(image, width, height) + + # Convert an 8 bit greyscale image to a 24 bit rgb image + if verbose: + print 'grey2rgb' + image = imageop.grey2rgb(greyimage, width, height) + # Convert a 8-bit deep greyscale image to a 1-bit deep image by # tresholding all the pixels. The resulting image is tightly packed # and is probably only useful as an argument to mono2grey. |