Update to 2.0.0 tree from current Fremantle build
[opencv] / tests / swig_python / highgui / cvLoadImagePNG.py
diff --git a/tests/swig_python/highgui/cvLoadImagePNG.py b/tests/swig_python/highgui/cvLoadImagePNG.py
new file mode 100755 (executable)
index 0000000..a5b354e
--- /dev/null
@@ -0,0 +1,22 @@
+#! /usr/bin/env python
+"""
+This script will test highgui's image loading functionality
+for .png files
+"""
+
+# file extension to check
+EXTENSION  = "png"
+
+# 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)
+