PHP code example of hcharbonnier / mangatranslation
1. Go to this page and download the library: Download hcharbonnier/mangatranslation 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/ */
hcharbonnier / mangatranslation example snippets
hcharbonnier\mangatranslation\MangaImage;
$trans=new MangaImage($argv[1]);
$trans->detect_block();
$trans->merge_near_block();
$trans->ocr();
$trans->translate("google"); // possible values are "google" (default) or "deepl"
$trans->remove_empty_block();
$trans->clean_raw();
$trans->write_translation();
$trans->export($argv[2],90);