PHP code example of bingher / zipimg
1. Go to this page and download the library: Download bingher/zipimg library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bingher / zipimg example snippets
$input = 'path-of-image';
$zipimg = new \bingher\zipimg\Image();
$zipimg->zip($input);
# 助手函数
zipimg($input);
pip install -r
bingher\transmit\Client;
$client = new Client('127.0.0.1', 8000);
$params = [
'in_img' => __DIR__ . '/input/1.jpg',
'out_img' => __DIR__ . '/output/1.test.jpg',
];
$result = $client->zip($params);
var_dump($result);
# 助手函数
$input = __DIR__ . '/input/1.jpg';
$result = remote_zipimg($input);
var_dump($result);