X-Git-Url: http://git.maemo.org/git/?p=opencv;a=blobdiff_plain;f=tests%2Fpython%2Fhighgui%2FcvLoadImage.py;fp=tests%2Fpython%2Fhighgui%2FcvLoadImage.py;h=0000000000000000000000000000000000000000;hp=7a0363a01bd6beeac8c8fe59783fc6b61620fd5b;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hpb=454138ff8a20f6edb9b65a910101403d8b520643 diff --git a/tests/python/highgui/cvLoadImage.py b/tests/python/highgui/cvLoadImage.py deleted file mode 100755 index 7a0363a..0000000 --- a/tests/python/highgui/cvLoadImage.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -This script will test highgui's image loading functionality -for a given parameter of a file extension. -""" - - -# needed for sys.exit(int) and .works file handling -import os -import sys -import works -from works import * - -#import the necessary things for OpenCV -import python -from python.highgui import * -from python.cv import * - - -# some defines -TESTNAME = "cvLoadImage" -REQUIRED = [] - -# path to imagefiles we need -PREFIX=os.environ["top_srcdir"]+"/tests/python/testdata/images/baboon_256x256" - - -# this functions tries to open an imagefile -# using the filename PREFIX.EXTENSION and returns True/False -# on success/fail. - -def image_ok( EXTENSION ): - - # check requirements and delete old .works file - WORKSNAME = TESTNAME+'.'+EXTENSION - - if not works.check_files( REQUIRED, WORKSNAME ): - print "worksfile "+WORKSNAME+" not found." - return False - - image = cvLoadImage(PREFIX+'.'+EXTENSION) - - if image is None: - return False - else: - works.set_file( TESTNAME+EXTENSION ) - return True