2017 © Pedro Peláez
 

library php-thumbnail

thumbnail

image

wangta69/php-thumbnail

thumbnail

  • Tuesday, April 24, 2018
  • by wangta69
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 200 % Grown

The README.md

php-thumbnail

Installation

composer require wangta69/php-thumbnail

composer require "wangta69/php-thumbnail @dev"

How to Use

save remote image to local

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(source image url)

=== read image from url;, (*1)

set_size(width, height)

=== create blank image, (*2)

copyimage()

=== copy source image to destination image with croping from center, (*3)

copyWithRatio()

=== copy source image to destination image, (*4)

save(destinaition image url)

=== save or create image, (*5)

format(image format)

=== change image format, (*6)

name('image name')

=== change image name, image name shoud be without extention, extention will be created according to image format, (*7)

save remote image to local (image resizing With croping sourceimage from center )

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);

save remote image to local (image resizing With maintaining the source ratio )

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);

save remote image to local (image resizing With the ratio maintained and change file 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)->copyWithRatio()->format('png')->save($save_path);

save remote image to local (change file name )

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);

The Versions

24/04 2018

dev-master

9999999-dev

thumbnail

  Sources   Download

MIT

The Requires

 

by Pondol

laravel thumbnail pondol

16/03 2018

1.0.2

1.0.2.0

thumbail

  Sources   Download

MIT

The Requires

 

by Pondol

laravel thumbnail pondol

28/02 2018

1.0.1

1.0.1.0

thumbail

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel pondol thumbail

28/02 2018

1.0.0

1.0.0.0

thumbail

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel pondol thumbail