--- fract/mandelzoom.cgi 2001/02/25 05:49:07 1.2 +++ fract/mandelzoom.cgi 2001/02/26 05:31:47 1.7 @@ -3,19 +3,24 @@ import cgi, Image, ImageDraw, sys, math from string import atoi, atof +# This is to get backtrace output sys.stderr = sys.stdout +# Uncomment this to get the backtrace more readable +#print "Content-Type: text/plain" +#print "" + form= cgi.FieldStorage() # Image size if form.has_key('width'): width= atoi(form['width'].value) else: - width= 570 + width= 480 if form.has_key('height'): height= atoi(form['height'].value) else: - height= 570 + height= 480 xmax, ymax = width-1, height-1 # Coordinate maximums @@ -23,17 +28,17 @@ if form.has_key('cx'): cx= atof(form['cx'].value) else: - cx= 0 + cx= 0.0 if form.has_key('cy'): cy= atof(form['cy'].value) else: - cy= 0 + cy= 0.0 if form.has_key('diag'): diag= atof(form['diag'].value) else: - diag= math.sqrt(8) + diag= math.sqrt(32) # sqrt(4**2 + 4**2) debug= form.has_key('debug') @@ -42,19 +47,16 @@ else: maxiter= 270 -#print "Content-Type: text/plain" -#print "" - # If type!=image, then output an HTML page, not an image if not (form.has_key('type') and form['type'].value == "image"): print """Content-Type: text/html
-