{"id":19273803,"url":"https://github.com/delfimov/gdimage","last_synced_at":"2025-06-21T04:08:59.309Z","repository":{"id":23474818,"uuid":"99135056","full_name":"delfimov/GDImage","owner":"delfimov","description":"Easy to use image manipulation tool based on PHP-GD","archived":false,"fork":false,"pushed_at":"2022-10-24T11:01:36.000Z","size":21040,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T04:08:51.625Z","etag":null,"topics":["gdimage","image","image-manipulation","php","php-gd","watermark"],"latest_commit_sha":null,"homepage":null,"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/delfimov.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":"2017-08-02T15:52:19.000Z","updated_at":"2023-04-11T00:57:19.000Z","dependencies_parsed_at":"2022-07-25T13:32:10.764Z","dependency_job_id":null,"html_url":"https://github.com/delfimov/GDImage","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/delfimov/GDImage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FGDImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FGDImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FGDImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FGDImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delfimov","download_url":"https://codeload.github.com/delfimov/GDImage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FGDImage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261060154,"owners_count":23103985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gdimage","image","image-manipulation","php","php-gd","watermark"],"created_at":"2024-11-09T20:44:10.307Z","updated_at":"2025-06-21T04:08:54.289Z","avatar_url":"https://github.com/delfimov.png","language":"PHP","readme":"[![Latest Stable Version](https://poser.pugx.org/delfimov/gdimage/v/stable)](https://packagist.org/packages/delfimov/gdimage)\n[![Build Status](https://travis-ci.org/delfimov/GDImage.svg?branch=master)](https://travis-ci.org/delfimov/GDImage)\n[![StyleCI](https://styleci.io/repos/99135056/shield?branch=master)](https://styleci.io/repos/99135056)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/a6ab283e-ac26-4ff2-9b71-9aa2f0a45fbc/mini.png)](https://insight.sensiolabs.com/projects/a6ab283e-ac26-4ff2-9b71-9aa2f0a45fbc)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/delfimov/GDImage/blob/master/LICENSE)\n\n# GDImage\n\nEasy to use image manipulation tool based on PHP-GD extension.\n\n## Key features\n\n * Easy to use.\n * JPEG, PNG, GIF, WEBP support. \n * Method chaining.\n * JPEG autorotation (ext-exif required) based on EXIF header\n * Easy to resize, crop, rotate, add text, flip, merge, set opactity\n\n## Requirements\n\n * [PHP \u003e= 5.4](http://www.php.net/)\n * [PHP GD](http://php.net/manual/image.installation.php)\n\n## How to install\n\n```sh\ncomposer require delfimov/gdimage\n```\n\nor add this line to your composer.json file:\n\n```json\n\"delfimov/gdimage\": \"~1.0\"\n```\n\n\nAlternatively, copy the contents of the gdimage folder into one of \nyour project's directories and `require 'src/GDImage.php';`. \n\n## A Simple Example\n\n```php\n// initialize GDImage\n$image = new GDImage('path/to/image.jpg');\n \n// set fill color for empty image areas\n$image-\u003esetFillColor([255, 0, 0]);\n\n// Resize image. By default images are resized proportional and are not cropped,  \n// with empty areas filled with color specified in setFillColor() method\n$image-\u003eresize(1280, 720);\n\n/* Add text to image \nThe first parameter is text to add, \nthe second parameter is optional, by default equals to: \n[\n    'size' =\u003e 20,\n    'angle' =\u003e 0,\n    'x' =\u003e 0,\n    'y' =\u003e 0,\n    'color' =\u003e [0, 0, 0],\n    'font' =\u003e '/../fonts/Roboto-Medium.ttf'\n] \n*/\n$image-\u003eaddText(\n    'Sample text to add',\n    [\n        'font' =\u003e __DIR__ . '/../fonts/Roboto-Medium.ttf',\n        'size' =\u003e 18,\n        'x' =\u003e 150,\n        'y' =\u003e 100,\n        'color' =\u003e [255, 0, 0]\n    ]\n);\n\n// Save image\n$image-\u003esave('path/to/newimage.jpg');\n```\n\n## TODO\n\n * Examples\n * Readme\n * More unit tests\n * Animated gifs support\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfimov%2Fgdimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelfimov%2Fgdimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfimov%2Fgdimage/lists"}