Docs tweaks

This commit is contained in:
Revar Desmera 2019-05-26 23:56:41 -07:00
parent 09f0351d22
commit ac9ef3b9e4
2 changed files with 5 additions and 6 deletions

View file

@ -409,8 +409,8 @@ module trace_polyline(pline, N=1, showpts=false, size=1, color="yellow") {
// Example(Big2D):
// debug_polygon(
// points=concat(
// regular_ngon(r=10, n=8),
// regular_ngon(r=8, n=8)
// regular_ngon(or=10, n=8),
// regular_ngon(or=8, n=8)
// ),
// paths=[
// [for (i=[0:7]) i],

View file

@ -254,10 +254,9 @@ class ImageProcessing(object):
os.rename(newimgfile, targimgfile)
else:
if targimgfile.endswith(".gif"):
cmpcmd = ["cmp", newimgfile, targimgfile]
p = subprocess.Popen(cmpcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
err = p.stdout.read()
issame = p.returncode == 0
cmpcmd = ["cmp", "-s", newimgfile, targimgfile]
res = subprocess.call(cmpcmd)
issame = res == 0
else:
cmpcmd = [COMPARE, "-metric", "MAE", newimgfile, targimgfile, "null:"]
p = subprocess.Popen(cmpcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)