{"id":37005583,"url":"https://github.com/dngo-io/cover-creator","last_synced_at":"2026-01-14T00:40:40.878Z","repository":{"id":56970442,"uuid":"137644765","full_name":"dngo-io/cover-creator","owner":"dngo-io","description":"Write texts on images with php","archived":false,"fork":false,"pushed_at":"2018-06-23T09:24:36.000Z","size":321,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T17:17:00.960Z","etag":null,"topics":["image-manipulation","image-processing","image-text","php","textview"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dngo-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-17T09:56:03.000Z","updated_at":"2022-10-22T04:42:30.000Z","dependencies_parsed_at":"2022-08-21T10:50:45.767Z","dependency_job_id":null,"html_url":"https://github.com/dngo-io/cover-creator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dngo-io/cover-creator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dngo-io%2Fcover-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dngo-io%2Fcover-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dngo-io%2Fcover-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dngo-io%2Fcover-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dngo-io","download_url":"https://codeload.github.com/dngo-io/cover-creator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dngo-io%2Fcover-creator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-manipulation","image-processing","image-text","php","textview"],"created_at":"2026-01-14T00:40:40.739Z","updated_at":"2026-01-14T00:40:40.807Z","avatar_url":"https://github.com/dngo-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### DNGO Book Cover Creator\n\nUsage;\n\nFirst install package via composer;\n\n```\ncomposer require dngo-io/cover-creator\n```\n\n\nSample code;\n\u003e To use this package, you need to install [PHP GD](http://php.net/manual/en/book.image.php) library to server\n\n```php\nrequire (\"vendor/autoload.php\");\n\n\nuse DngoIO\\CoverCreator\\Generator;\n\n$text1 = [\n        'font-size' =\u003e 18,  //px\n        'font-type' =\u003e __DIR__ . '../assets/Roboto-Regular.ttf', //path of ttf file on server\n        'text-color' =\u003e [61,183,228],\n        'left' =\u003e 0,\n        'top' =\u003e 0,\n        'background-url' =\u003e __DIR__ . '../assets/background.jpg' //path of the png\n    ];\n\n$text2 = [\n        'font-size' =\u003e 12,  //px\n        'font-type' =\u003e __DIR__ . '../assets/Roboto-Italic.ttf', //path of ttf file on server\n        'text-color' =\u003e [61,183,228],\n        'left' =\u003e 50,\n        'top' =\u003e 30,\n    ];\n\n\n$config = [\n        'auto-center' =\u003e true,\n        'angle' =\u003e 0,\n        'header' =\u003e 'Content-type: image/jpeg',\n    ];\n  \ntry {\n    $generator = new Generator();\n    $generator-\u003esetConfig($config); //or new Generator($config)\n    $generator-\u003eaddLine('My First Text', $text1);\n    $generator-\u003eaddLine('Second ine Text', $text2);\n    $generator-\u003egenerate();\n}catch (\\Exception $e) {\n    echo $e-\u003egetMessage();\n}\n\n```\n\n\n#### Available Selector Values\n\n|  Name |  Value  |   Description |\n|-------|---------|---------------|\n|  font-size |  integer | Font size  in px. Only integer values |\n|  font-type |  file    | Font file on the server. Exact path and file name. |\n|  text-color |  array |  text color as RGB |\n|  left |  integer |  Margin Left value of text |\n|  top |  integer |  Margin Top value of text |\n|  wrap (optional) |  integer | Integer value to wrap text. If disables *auto-center* selector.  |\n\n\n### Availabile Config Values\nthe ``Generator`` class takes third parameter as configs.\n\n| Name | Value  | Description |\n|------|--------|-------------|\n|   auto-center   |  bool  | Enable text center on image |\n|   angle   | integer |Angle of the text on image |\n|   header  | string | default value of header when image generated. default is  ``Content-type: image/jpeg`` |\n|   background-url |  file |  Background file on the server. Exact path and file name. Should be PNG or JPG |\n\n```\nImportant: If you wrap the line, auto-center is forced to false.\n```\n\n### Error Handling\n\nCoverCreator has 2 exceptions.\n`` InvalidFileException`` is thrown when the background image is not ok.\n``InvalidTypeException`` is thrown when any of selector value is not valid.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdngo-io%2Fcover-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdngo-io%2Fcover-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdngo-io%2Fcover-creator/lists"}