Evaluated proc jpegmaxsize {min max {step 5} {lmax 444}} { for {set x $max} {$x >= $min} {incr x [expr -1*$step]} { if { [longest_line [jpg do $x]] < $lmax } { return [jpg do $x] } } }