-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade version * readme * update * cleanup * http client update * Feature/removebg (#8) * remove bg * convert image issue * remove repair image tool * repair add * upscale tool (#9) * version
- Loading branch information
Showing
25 changed files
with
613 additions
and
1,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<phpunit bootstrap="tests/bootstrap.php" colors="true"> | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" colors="true" cacheResult="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Iloveimg PHP Test Suite"> | ||
<directory suffix="Test.php">tests</directory> | ||
<exclude>./tests/TestCase.php</exclude> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
<exclude>./tests/TestCase.php</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="7" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
<ignoreFiles> | ||
<directory name="vendor" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
//include the autoloader | ||
require_once('../vendor/autoload.php'); | ||
//if manual installation has been used comment line that requires the autoload and uncomment this line: | ||
//require_once('../init.php'); | ||
|
||
|
||
use Iloveimg\RemovebackgroundImageTask; | ||
|
||
|
||
// you can call task class directly | ||
// to get your key pair, please visit https://developer.iloveimg.com/user/projects | ||
$myTask = new RemovebackgroundImageTask('project_public_id','project_secret_key'); | ||
|
||
// file var keeps info about server file id, name... | ||
// it can be used latter to cancel file | ||
$file = $myTask->addFile('/path/to/file/image.jpg'); | ||
|
||
|
||
// and set name for output file. | ||
// the task will set the correct file extension for you. | ||
$myTask->setOutputFilename('image_without_background'); | ||
|
||
// process files | ||
$myTask->execute(); | ||
|
||
// and finally download file. If no path is set, it will be downloaded on current folder | ||
$myTask->download('path/to/download'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
//include the autoloader | ||
require_once('../vendor/autoload.php'); | ||
//if manual installation has been used comment line that requires the autoload and uncomment this line: | ||
//require_once('../init.php'); | ||
|
||
use Iloveimg\RemovebackgroundImageTask; | ||
|
||
|
||
// you can call task class directly | ||
// to get your key pair, please visit https://developer.iloveimg.com/user/projects | ||
$myTask = new RemovebackgroundImageTask('project_public_id','project_secret_key'); | ||
|
||
// file var keeps info about server file id, name... | ||
// it can be used latter to cancel file | ||
$file = $myTask->addFile('/path/to/file/image.jpg'); | ||
|
||
// process files | ||
$myTask->execute(); | ||
|
||
// and finally download file. If no path is set, it will be downloaded on current folder | ||
$myTask->download(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
//include the autoloader | ||
require_once('../vendor/autoload.php'); | ||
//if manual installation has been used comment line that requires the autoload and uncomment this line: | ||
//require_once('../init.php'); | ||
|
||
|
||
use Iloveimg\UpscaleImageTask; | ||
|
||
|
||
// you can call task class directly | ||
// to get your key pair, please visit https://developer.iloveimg.com/user/projects | ||
$myTask = new UpscaleImageTask('project_public_id','project_secret_key'); | ||
|
||
// file var keeps info about server file id, name... | ||
// it can be used latter to cancel file | ||
$file = $myTask->addFile('/path/to/file/image.jpg'); | ||
|
||
// set the scale | ||
$file->setMultiplier(4); | ||
|
||
|
||
// and set name for output file. | ||
// the task will set the correct file extension for you. | ||
$myTask->setOutputFilename('image_upscaled_x4'); | ||
|
||
// process files | ||
$myTask->execute(); | ||
|
||
// and finally download file. If no path is set, it will be downloaded on current folder | ||
$myTask->download('path/to/download'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
//include the autoloader | ||
require_once('../vendor/autoload.php'); | ||
//if manual installation has been used comment line that requires the autoload and uncomment this line: | ||
//require_once('../init.php'); | ||
|
||
use Iloveimg\UpscaleImageTask; | ||
|
||
|
||
// you can call task class directly | ||
// to get your key pair, please visit https://developer.iloveimg.com/user/projects | ||
$myTask = new UpscaleImageTask('project_public_id','project_secret_key'); | ||
|
||
// file var keeps info about server file id, name... | ||
// it can be used latter to cancel file | ||
$file = $myTask->addFile('/path/to/file/image.jpg'); | ||
|
||
// process files | ||
$myTask->execute(); | ||
|
||
// and finally download file. If no path is set, it will be downloaded on current folder | ||
$myTask->download(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Iloveimg\Exceptions; | ||
|
||
class NotImplementedException extends \Exception { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.