public function mirror($mode) { $this->preModify(); if ($mode == "vertical") { imageflip($this->resource, IMG_FLIP_VERTICAL); } elseif ($mode == "horizontal") { imageflip($this->resource, IMG_FLIP_HORIZONTAL); } $this->postModify(); return $this; }