rendered paste body<?php$im=imagecreatefrompng('scrambled.png');$newim=imagecreatetruecolor(200,100);$column=array();for($y=0; $y<imagesy($im); $y++){ $total=0; for($x=0; $x<20; $x++) { $rgb = imagecolorat($im, $x, $y); $r = ($rgb >> 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF; $total+=$g+$b+$r; } for($x=199; $x>160; $x--) { $rgb = imagecolorat($im, $x, $y); $r = ($rgb >> 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF; $total+=$r+$g+$b; } $ave=$total; echo $ave.'<br>'; $column[$y]=$ave; empty($total);}$newy=0;for($a=0; $a<=40000; $a++){ for($b=0; $b<=sizeof($column); $b++) { if($column[$b]==$a) { for($x=0; $x<imagesy($im); $x++) { imagecopy($newim, $im, $x, $newy, $x, $b, 200, 100); } $newy++; } }}imagepng($newim, 'finished.png');?>