fix some whitespace issues

This commit is contained in:
Zach Prezkuta 2012-06-18 21:06:54 -06:00
parent 42fa47e8f7
commit 7cd516e34f
1 changed files with 13 additions and 13 deletions

View File

@ -124,20 +124,20 @@ class Photo {
} }
public function flip($horiz = true, $vert = false) { public function flip($horiz = true, $vert = false) {
$w = imagesx($this->image); $w = imagesx($this->image);
$h = imagesy($this->image); $h = imagesy($this->image);
$flipped = imagecreate($w, $h); $flipped = imagecreate($w, $h);
if($horiz) { if($horiz) {
for ($x = 0; $x < $w; $x++) { for ($x = 0; $x < $w; $x++) {
imagecopy($flipped, $this->image, $x, 0, $w - $x - 1, 0, 1, $h); imagecopy($flipped, $this->image, $x, 0, $w - $x - 1, 0, 1, $h);
} }
} }
if($vert) { if($vert) {
for ($y = 0; $y < $h; $y++) { for ($y = 0; $y < $h; $y++) {
imagecopy($flipped, $this->image, 0, $y, 0, $h - $y - 1, $w, 1); imagecopy($flipped, $this->image, 0, $y, 0, $h - $y - 1, $w, 1);
} }
} }
$this->image = $flipped; $this->image = $flipped;
} }
public function orient($filename) { public function orient($filename) {