diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-05-20 07:09:50 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-05-20 07:09:50 +0000 |
commit | dc48b74497b67a449dd622fdaa7d69e7bff65a5e (patch) | |
tree | ba027660da3557237255591af3491af213e3a15e /Lib/test/test_imageop.py | |
parent | 8d76cca0265aaa23d2a59af3bfb1bcd133c0a59d (diff) | |
download | cpython-git-dc48b74497b67a449dd622fdaa7d69e7bff65a5e.tar.gz |
Remove the rgbimg module. It has been deprecated since Python 2.5.
Diffstat (limited to 'Lib/test/test_imageop.py')
-rwxr-xr-x | Lib/test/test_imageop.py | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py index b01e83fa28..8789c13ec5 100755 --- a/Lib/test/test_imageop.py +++ b/Lib/test/test_imageop.py @@ -10,20 +10,13 @@ from test.test_support import verbose, unlink import imageop, uu, os import warnings -warnings.filterwarnings("ignore", - "the rgbimg module is deprecated", - DeprecationWarning, - ".*test_imageop") -def main(use_rgbimg=1): +def main(): # Create binary test files uu.decode(get_qualified_path('testrgb'+os.extsep+'uue'), 'test'+os.extsep+'rgb') - if use_rgbimg: - image, width, height = getrgbimage('test'+os.extsep+'rgb') - else: - image, width, height = getimage('test'+os.extsep+'rgb') + image, width, height = getimage('test'+os.extsep+'rgb') # Return the selected part of image, which should by width by height # in size and consist of pixels of psize bytes. @@ -122,23 +115,6 @@ def main(use_rgbimg=1): # Cleanup unlink('test'+os.extsep+'rgb') -def getrgbimage(name): - """return a tuple consisting of image (in 'imgfile' format but - using rgbimg instead) width and height""" - - import rgbimg - - try: - sizes = rgbimg.sizeofimage(name) - except rgbimg.error: - name = get_qualified_path(name) - sizes = rgbimg.sizeofimage(name) - if verbose: - print 'rgbimg opening test image: %s, sizes: %s' % (name, str(sizes)) - - image = rgbimg.longimagedata(name) - return (image, sizes[0], sizes[1]) - def getimage(name): """return a tuple consisting of image (in 'imgfile' format) width and height @@ -172,6 +148,4 @@ def get_qualified_path(name): return fullname return name -# rgbimg (unlike imgfile) is portable to platforms other than SGI. -# So we prefer to use it. -main(use_rgbimg=1) +main() |