Lines Matching refs:image
26 def corrupt(image, offset, length): argument
28 f = os.open(image, os.O_WRONLY)
33 def corruptmax(image, roots): argument
34 size = os.stat(image).st_size
42 corrupt(image, offset, max_errors)
44 def encode(image, fec, roots): argument
45 if subprocess.call([ "fec", "--roots= " + str(roots), image, fec ]) != 0:
48 def decode(image, fec, output): argument
49 return subprocess.call([ "fec", "--decode", image, fec, output ])
54 def simg2img(image, output): argument
55 print "creating a non-sparse copy of '%s' to '%s'" % (image, output)
56 if subprocess.call([ "simg2img", image, output]) != 0:
60 image = argv[0]
67 simg2img(image, temp_img.name)
68 simg2img(image, temp_cor.name)
70 encode(image, temp_fec.name, roots)