composer require wangta69/php-thumbnail
composer require "wangta69/php-thumbnail @dev"
use Pondol\Image\GetHttpImage;
$img_url = 'http://www.shop-wiz.com/myphoto.jpg';
$save_path = '/home/photos';
$image = new GetHttpImage();
$image->read($img_url)->save($save_path);
=== read image from url;
=== create blank image
=== copy source image to destination image with croping from center
=== copy source image to destination image
=== save or create image
=== change image format
=== change image name, image name shoud be without extention, extention will be created according to image format
use Pondol\Image\GetHttpImage;
$img_url = 'http://www.shop-wiz.com/myphoto.jpg';
$save_path = '/home/photos';
$image = new GetHttpImage();
$image->read($img_url)->->set_size(100, 100)->copyimage()->save($save_path);
use Pondol\Image\GetHttpImage;
$img_url = 'http://www.shop-wiz.com/myphoto.jpg';
$save_path = '/home/photos';
$image = new GetHttpImage();
$image->read($img_url)->->set_size(100, 100)->copyWithRatio()->save($save_path);
use Pondol\Image\GetHttpImage;
$img_url = 'http://www.shop-wiz.com/myphoto.jpg';
$save_path = '/home/photos';
$image = new GetHttpImage();
$image->read($img_url)->set_size(100, 100)->copyWithRatio()->format('png')->save($save_path);
use Pondol\Image\GetHttpImage;
$img_url = 'http://www.shop-wiz.com/myphoto.jpg';
$save_path = '/home/photos';
$image = new GetHttpImage();
$image->read($img_url)->set_size(100, 100)->copyWithRatio()->name('myphoto')->save($save_path);
or
$image->read($img_url)->set_size(100, 100)->copyWithRatio()->name('myphoto')->format('png')->save($save_path);