--- fract/mandelzoom.cgi 2001/02/25 05:49:07 1.2 +++ fract/mandelzoom.cgi 2001/02/25 20:10:53 1.3 @@ -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 @@ -40,10 +45,7 @@ if form.has_key('iter'): maxiter= atoi(form['iter'].value) else: - maxiter= 270 - -#print "Content-Type: text/plain" -#print "" + maxiter= 240 # If type!=image, then output an HTML page, not an image if not (form.has_key('type') and form['type'].value == "image"): @@ -76,15 +78,20 @@ print 'ALIGN=BOTTOM HEIGHT="%s"' % (str(height)), print 'WIDTH="%s">

' % (str(width)) print 'Zoom: ' print """Width: @@ -92,14 +99,17 @@ VALUE="%s"> Iterations: - Debug mode: ' else: print '>' - for key in form.keys(): - if key not in ["zoom", "type", "debug", "image.x", "image.y", "iter", "height", "width"]: - print '' % (key, form[key].value) + print '' + #for key in form.keys(): + # if key not in ["zoom", "type", "debug", "image.x", "image.y", "iter", "height", "width"]: + # print '' % (key, form[key].value) + #for var in [("diag", diag), ("cx", cx), ("cy", cy)]: + print '' print """