mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
23 lines
383 B
Python
Executable File
23 lines
383 B
Python
Executable File
#! /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)
|
|
|