| @@ 1058-1074 (lines=17) @@ | ||
| 1055 | ||
| 1056 | if ($this->rotation_angle === 'hor') |
|
| 1057 | { |
|
| 1058 | for ($i = 0; $i < $height; $i++) |
|
| 1059 | { |
|
| 1060 | $left = 0; |
|
| 1061 | $right = $width - 1; |
|
| 1062 | ||
| 1063 | while ($left < $right) |
|
| 1064 | { |
|
| 1065 | $cl = imagecolorat($src_img, $left, $i); |
|
| 1066 | $cr = imagecolorat($src_img, $right, $i); |
|
| 1067 | ||
| 1068 | imagesetpixel($src_img, $left, $i, $cr); |
|
| 1069 | imagesetpixel($src_img, $right, $i, $cl); |
|
| 1070 | ||
| 1071 | $left++; |
|
| 1072 | $right--; |
|
| 1073 | } |
|
| 1074 | } |
|
| 1075 | } |
|
| 1076 | else |
|
| 1077 | { |
|
| @@ 1078-1094 (lines=17) @@ | ||
| 1075 | } |
|
| 1076 | else |
|
| 1077 | { |
|
| 1078 | for ($i = 0; $i < $width; $i++) |
|
| 1079 | { |
|
| 1080 | $top = 0; |
|
| 1081 | $bottom = $height - 1; |
|
| 1082 | ||
| 1083 | while ($top < $bottom) |
|
| 1084 | { |
|
| 1085 | $ct = imagecolorat($src_img, $i, $top); |
|
| 1086 | $cb = imagecolorat($src_img, $i, $bottom); |
|
| 1087 | ||
| 1088 | imagesetpixel($src_img, $i, $top, $cb); |
|
| 1089 | imagesetpixel($src_img, $i, $bottom, $ct); |
|
| 1090 | ||
| 1091 | $top++; |
|
| 1092 | $bottom--; |
|
| 1093 | } |
|
| 1094 | } |
|
| 1095 | } |
|
| 1096 | ||
| 1097 | // Show the image |
|