mirror of
https://github.com/python/cpython.git
synced 2025-08-08 02:48:55 +00:00
Opps. Added tests for the last two methods that were missing from
the test program: 'grey2rgb' and 'rgb2grey'
This commit is contained in:
parent
e17ec8d149
commit
52a6ea7b7d
1 changed files with 11 additions and 1 deletions
|
@ -36,7 +36,7 @@ def main(use_rgbimg=1):
|
||||||
print 'tovideo'
|
print 'tovideo'
|
||||||
videoimage = imageop.tovideo (image, 4, width, height)
|
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:
|
if verbose:
|
||||||
print 'rgb2rgb8'
|
print 'rgb2rgb8'
|
||||||
greyimage = imageop.rgb2rgb8(image, width, height)
|
greyimage = imageop.rgb2rgb8(image, width, height)
|
||||||
|
@ -46,6 +46,16 @@ def main(use_rgbimg=1):
|
||||||
print 'rgb82rgb'
|
print 'rgb82rgb'
|
||||||
image = imageop.rgb82rgb(greyimage, width, height)
|
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
|
# Convert a 8-bit deep greyscale image to a 1-bit deep image by
|
||||||
# tresholding all the pixels. The resulting image is tightly packed
|
# tresholding all the pixels. The resulting image is tightly packed
|
||||||
# and is probably only useful as an argument to mono2grey.
|
# and is probably only useful as an argument to mono2grey.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue