コード例 #1
0
ファイル: test_rgbimg.py プロジェクト: 8Banana/py1.0
def testimg(rgb_file, raw_file):
    width, height = rgbimg.sizeofimage(rgb_file)
    rgb = rgbimg.longimagedata(rgb_file)
    if len(rgb) != width * height * 4:
        raise error, 'bad image length'
    raw = open(raw_file, 'r').read()
    if rgb != raw:
        raise error, 'images don\'t match for ' + rgb_file + ' and ' + raw_file
    for depth in [1, 3, 4]:
        rgbimg.longstoimage(rgb, width, height, depth, '@.rgb')
    os.unlink('@.rgb')
コード例 #2
0
def testimg(rgb_file, raw_file):
	width, height = rgbimg.sizeofimage(rgb_file)
	rgb = rgbimg.longimagedata(rgb_file)
	if len(rgb) != width * height * 4:
		raise error, 'bad image length'
	raw = open(raw_file, 'r').read()
	if rgb != raw:
		raise error, 'images don\'t match for '+rgb_file+' and '+raw_file
	for depth in [1, 3, 4]:
		rgbimg.longstoimage(rgb, width, height, depth, '@.rgb')
	os.unlink('@.rgb')
コード例 #3
0
ファイル: imgsgi.py プロジェクト: mcyril/ravel-ftn
"""
コード例 #4
0
ファイル: imgsgi.py プロジェクト: mcyril/ravel-ftn
"""
コード例 #5
0
# Testing rgbimg module