X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fswig_python%2Fhighgui%2FcvLoadImageJPG.py;fp=tests%2Fswig_python%2Fhighgui%2FcvLoadImageJPG.py;h=d4a69dbc873e4bc0d17074ddcbfbe6b3842e9e85;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hp=0000000000000000000000000000000000000000;hpb=454138ff8a20f6edb9b65a910101403d8b520643;p=opencv diff --git a/tests/swig_python/highgui/cvLoadImageJPG.py b/tests/swig_python/highgui/cvLoadImageJPG.py new file mode 100755 index 0000000..d4a69db --- /dev/null +++ b/tests/swig_python/highgui/cvLoadImageJPG.py @@ -0,0 +1,22 @@ +#! /usr/bin/env python +""" +This script will test highgui's image loading functionality +for .jpg files +""" + +# file extension to check +EXTENSION = "jpg" + +# import check routine +import cvLoadImage +import sys + +# check image file of extension EXTENSION, +# the function also exits and returns +# 0,1 or 77 accordingly. + +if cvLoadImage.image_ok(EXTENSION): + sys.exit(0) +else: + sys.exit(1) +