Просмотр поста

.
Delphinum

Для обработки изображений в последнем своем проекте использовал данный пакет.

В живую это выглядело так:

$this->fileTable->edit($file, function(SimpleImage $editor) use($data){                                                                                
  $editor->crop(                                                                   
    (int) $data['up_photo']['x'],                                                  
    (int) $data['up_photo']['y'],                                                  
    ((int) $data['up_photo']['x'] + (int) $data['up_photo']['width']),          
    ((int) $data['up_photo']['y'] + (int) $data['up_photo']['height'])          
  );                                                                            
  $editor->resize(1080, 1200);                                                     
  return [80, Mimetype::IMG_JPG];                                               
});