r11baka / deepai
Simple deepai.org colorization client
0.11
2022-03-12 12:42 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-fileinfo: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.7
This package is auto-updated.
Last update: 2024-11-03 10:32:47 UTC
README
Simple php wrapper for using https://deepai.org/machine-learning-model/colorizer api
Installation
composer require r11baka/deepai
How to use
- Pass your api-key to Deepai constuctor and ypu can colorize file by path.
$dp = new \R11baka\Deepai\Deepai("{YOU API_KEY FETCHED FROM DEEP AI}");
$resp = $dp->colorizeFromPath('./lena.jpg');
echo $resp->getUrl(); // returns url with colorized image
echo $resp->getId(); // return id for colorized job
Also you can colorize with content of file
$dp = new \R11baka\Deepai\Deepai("{YOU API_KEY FETCHED FROM DEEP AI}");
$resp = $dp->colorize(file_get_contents("./lena.jpg"));
echo $resp->getUrl(); // returns url with colorized image
echo $resp->getId(); // return id for colorized job
- You have method getUrl ,which have url with colorized image