public function generateCrops()
    {
        $w = imagesx($this->oImg);
        $h = imagesy($this->oImg);
        $results = [];
        $minDimension = min($w, $h);
        $cropWidth = empty ($this->options ['cropWidth']) ? $minDimension : $this->options ['cropWidth'];
        $cropHeight = empty ($this->options ['cropHeight']) ? $minDimension : $this->options ['cropHeight'];
        for ($scale = $this->options ['maxScale']; $scale >= $this->options ['minScale']; $scale -= $this->options ['scaleStep'])
        {
            for ($y = 0; $y + $cropHeight * $scale <= $h; $y += $this->options ['step'])
            {
                for ($x = 0; $x + $cropWidth * $scale <= $w; $x += $this->options ['step'])
                {
                    $results [] = [
                        'x' => $x,
                        'y' => $y,
                        'width' => $cropWidth * $scale,
                        'height' => $cropHeight * $scale
                    ];
                }
            }
        }

        return $results;
    }
public function generateCrops()
    {
        $w = imagesx($this->oImg);
        $h = imagesy($this->oImg);
        $results = [];
        $minDimension = min($w, $h);
        $cropWidth = empty ($this->options ['cropWidth']) ? $minDimension : $this->options ['cropWidth'];
        $cropHeight = empty ($this->options ['cropHeight']) ? $minDimension : $this->options ['cropHeight'];
        for ($scale = $this->options ['maxScale']; $scale >= $this->options ['minScale']; $scale -= $this->options ['scaleStep'])
        {
            for ($y = 0; $y + $cropHeight * $scale <= $h; $y += $this->options ['step'])
            {
                for ($x = 0; $x + $cropWidth * $scale <= $w; $x += $this->options ['step'])
                {
                    $results [] = [
                        'x' => $x,
                        'y' => $y,
                        'width' => $cropWidth * $scale,
                        'height' => $cropHeight * $scale
                    ];
                }
            }
        }

        return $results;
    }
public function generateCrops ( ) { $ w = imagesx ( $ this -> oImg ) ; $ h = imagesy ( $ this -> oImg ) ; $ results = [ ] ; $ minDimension = min ( $ w , $ h ) ; $ cropWidth = empty ( $ this -> options [ 'cropWidth' ] ) ? $ minDimension : $ this -> options [ 'cropWidth' ] ; $ cropHeight = empty ( $ this -> options [ 'cropHeight' ] ) ? $ minDimension : $ this -> options [ 'cropHeight' ] ; for ( $ scale = $ this -> options [ 'maxScale' ] ; $ scale >= $ this -> options [ 'minScale' ] ; $ scale -= $ this -> options [ 'scaleStep' ] ) { for ( $ y = 0 ; $ y + $ cropHeight * $ scale <= $ h ; $ y += $ this -> options [ 'step' ] ) { for ( $ x = 0 ; $ x + $ cropWidth * $ scale <= $ w ; $ x += $ this -> options [ 'step' ] ) { $ results [ ] = [ 'x' => $ x , 'y' => $ y , 'width' => $ cropWidth * $ scale , 'height' => $ cropHeight * $ scale ] ; } } } return $ results ; }
Generate crop schemes

@return array
Generate crop schemes