tunaqui/picresize

v1.1.0 2018-03-07 20:48 UTC

This package is auto-updated.

Last update: 2024-04-20 11:01:42 UTC


README

PicResize a small library that allows you to download images from a URL, store them and resize them.

Installation

Via Composer

$ composer require tunaqui/picresize

Install vendor

$ composer install

Usage

Download an image from a URL and store it in a directory.

$image = new \Tunaqui\PicResize\Picture();
$image->download('http://nisleen.com/images/logo.png');
$image->save('../download/');

Download an image from a URL, store it in a directory and resize.

$image = new \Tunaqui\PicResize\PictureResize('http://nisleen.com/images/logo.png', '../download/');
$image->resize(150, 150);
echo $image->response();

Create a thumbnail.

$img = new \Tunaqui\PicResize\PictureResize('../download/logo.png');
$img->thumbnail(100);
$img->show();

Create a thumbnail and save.

$img = new \Tunaqui\PicResize\PictureResize('../download/logo.png');
$img->thumbnail(100);
$img->saveNewSize();

Credits

License

The MIT License (MIT). Please see License File for more information.