Logo white

Denys / ImageCropper

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • ImageCropper
  • backend
  • components
  • croppers
  • AbstractCrop.php
  • Adding resizing and download feature
    bfa22e8e
    Administrator authored
    2015-10-29 11:10:07 +0200  
    Browse Code ยป
AbstractCrop.php 370 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php

namespace backend\components\croppers;


use backend\components\ConstantTrait;
use Imagine\Image\Box;
use Imagine\Image\Point;

abstract class AbstractCrop
{
    use ConstantTrait;

    public function crop($image, $path)
    {
        return $image->crop(new Point(static::X, static::Y), new Box(static::WIDTH, static::HEIGHT))
            ->save($path);
    }
}