src/Modules/Imager/GDDriver.php
public function flip($flip_x = false, $flip_y = false)
    {
        if (!$flip_x && !$flip_y) {
            return $this;
        }

        $x = $flip_x ? $this->width - 1 : 0;
        $width = ($flip_x ? -1 : 1) * $this->width;

        $y = $flip_y ? $this->height - 1 : 0;
        $height = ($flip_y ? -1 : 1) * $this->height;

        $flipped = $this->createGD($this->width, $this->height);
        imagecopyresampled($flipped, $this->image_handler, 0, 0, $x, $y, $this->width, $this->height, $width, $height);
        $this->setImage($flipped, $this->width, $this->height);

        return $this;
    }
public function flip($flip_x = false, $flip_y = false)
    {
        if (!$flip_x && !$flip_y) {
            return $this;
        }

        $x = $flip_x ? $this->width - 1 : 0;
        $width = ($flip_x ? -1 : 1) * $this->width;

        $y = $flip_y ? $this->height - 1 : 0;
        $height = ($flip_y ? -1 : 1) * $this->height;

        $flipped = $this->createGD($this->width, $this->height);
        imagecopyresampled($flipped, $this->image_handler, 0, 0, $x, $y, $this->width, $this->height, $width, $height);
        $this->setImage($flipped, $this->width, $this->height);

        return $this;
    }
@param bool $flip_x
@param bool $flip_y

@return $this