{"id":15633619,"url":"https://github.com/joseluisq/gimage","last_synced_at":"2025-04-06T19:13:33.315Z","repository":{"id":57001663,"uuid":"46204818","full_name":"joseluisq/gimage","owner":"joseluisq","description":"A PHP library for easy image handling. 🖼","archived":false,"fork":false,"pushed_at":"2022-10-26T18:01:17.000Z","size":2438,"stargazers_count":152,"open_issues_count":2,"forks_count":11,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-23T14:11:11.149Z","etag":null,"topics":["crop","gd","image","jpg","jpg2png","php-library","png","rendering","resize","save","scale","shapes"],"latest_commit_sha":null,"homepage":"https://joseluisq.github.io/gimage/","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/joseluisq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-15T04:47:48.000Z","updated_at":"2023-12-02T10:13:58.000Z","dependencies_parsed_at":"2022-08-21T13:20:58.818Z","dependency_job_id":null,"html_url":"https://github.com/joseluisq/gimage","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joseluisq","download_url":"https://codeload.github.com/joseluisq/gimage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246351019,"owners_count":20763232,"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":["crop","gd","image","jpg","jpg2png","php-library","png","rendering","resize","save","scale","shapes"],"created_at":"2024-10-03T10:49:39.486Z","updated_at":"2025-04-06T19:13:33.294Z","avatar_url":"https://github.com/joseluisq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GImage\n\n[![Build Status](https://github.com/joseluisq/gimage/actions/workflows/devel.yml/badge.svg?branch=master)](https://github.com/joseluisq/gimage/actions/workflows/devel.yml) [![](https://poser.pugx.org/joseluisq/gimage/version)](https://packagist.org/packages/joseluisq/gimage) [![Latest Unstable Version](https://poser.pugx.org/joseluisq/gimage/v/unstable)](//packagist.org/packages/joseluisq/gimage) [![Total Downloads](https://poser.pugx.org/joseluisq/gimage/downloads)](https://packagist.org/packages/joseluisq/gimage) [![License](https://poser.pugx.org/joseluisq/gimage/license)](https://packagist.org/packages/joseluisq/gimage)\n\n\u003e A PHP library for easy image handling. 🖼\n\n__GImage__ is a simple and small library based on [PHP Image Processing and GD](http://php.net/manual/en/book.image.php) for processing images easily.\n\n![A simple presentation card with GImage](https://cloud.githubusercontent.com/assets/1700322/18941713/eed7fa34-85d8-11e6-8033-bf787e4aa236.png)\n\n_Presentation card built with GImage - [View code example](https://joseluisq.github.io/gimage/examples/creating-a-presentation-card/)_\n\n## Features\n\n- Load an image from a local path, URL or image resource.\n- Create shapes such as rectangles or ellipses with opacity.\n- Resize, scale or crop images proportionally.\n- Rotate images, shapes or texts.\n- Embed text with custom TTF fonts.\n- Compose a pool of images with `Canvas`.\n- Swap image formats such as JPEG, PNG or GIF.\n- Save images locally or output them on the browser.\n- Save several copies of the same image.\n- Render an image in memory and return its resource.\n\n## Requirements\n\nGImage requires PHP [`7.4`](https://www.php.net/releases/7_4_0.php) or a recent PHP version with the latest [GD Extension](http://php.net/manual/en/book.image.php).\n\n## Install\n\n```sh\ncomposer require joseluisq/gimage\n```\n\n## Usage\n\nLoad an external PNG image and save it as JPG:\n\n```php\n\u003c?php\n\nuse GImage\\Image;\n\n// PNG image (600x199)\n$url = 'https://i.imgur.com/G5MR088.png';\n\n$arch = new Image();\n$arch\n    // Load from URL\n    -\u003eload($url)\n    // Scale to 50% (300x99)\n    -\u003escale(0.5)\n    // Change the format to JPG\n    -\u003etoJPG()\n    // Saving in local path\n    -\u003esave('arch.jpg');\n```\n\nSee [GImage Website](https://bit.ly/gimage-php) for detailed usage instructions and more advanced examples.\n\n## Changelog\n\nCheck out the [CHANGELOG.md](./CHANGELOG.md) file.\n\n## Examples\n\nSee [code examples](./examples) directory.\n\n## Development\n\n### Run tests\n\nVia [Composer](https://getcomposer.org/)\n\n```sh\ncomposer install\ncomposer run-script test\n```\n\nVia [Docker](https://www.docker.com/) (multi PHP versions test)\n\n```sh\nmake docker-tests\n```\n\n## Contribution\n\nFeel free to send some [Pull request](https://github.com/joseluisq/gimage/pulls) or file an [issue](https://github.com/joseluisq/gimage/issues).\n\n## License\n\nThis work is primarily distributed under the terms of the [MIT license](LICENSE-MIT).\n\n©2015-present [Jose Quintana](https://joseluisq.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fgimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoseluisq%2Fgimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fgimage/lists"}