{"id":19273662,"url":"https://github.com/yusufshakeel/dyreimage-php","last_synced_at":"2025-10-15T23:19:34.941Z","repository":{"id":57088707,"uuid":"88646978","full_name":"yusufshakeel/dyreimage-php","owner":"yusufshakeel","description":"This is an image resizing project.","archived":false,"fork":false,"pushed_at":"2018-04-18T17:24:05.000Z","size":1276,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T15:04:39.425Z","etag":null,"topics":["image-compression","image-processing","images","php","php-gd","resize-images"],"latest_commit_sha":null,"homepage":"https://www.dyclassroom.com/dyreimage-php/getting-started","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/yusufshakeel.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-04-18T16:28:09.000Z","updated_at":"2018-04-18T17:23:19.000Z","dependencies_parsed_at":"2022-08-20T16:00:36.956Z","dependency_job_id":null,"html_url":"https://github.com/yusufshakeel/dyreimage-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusufshakeel%2Fdyreimage-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusufshakeel%2Fdyreimage-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusufshakeel%2Fdyreimage-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusufshakeel%2Fdyreimage-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusufshakeel","download_url":"https://codeload.github.com/yusufshakeel/dyreimage-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240378870,"owners_count":19792039,"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":["image-compression","image-processing","images","php","php-gd","resize-images"],"created_at":"2024-11-09T20:43:45.691Z","updated_at":"2025-10-15T23:19:29.909Z","avatar_url":"https://github.com/yusufshakeel.png","language":"PHP","funding_links":["https://paypal.me/yusufshakeel"],"categories":[],"sub_categories":[],"readme":"# dyreimage-php\nThis is an image resizing project.\n\n# Status\n\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yusufshakeel/dyreimage-php)\n[![Build Status](https://travis-ci.org/yusufshakeel/dyreimage-php.svg?branch=master)](https://travis-ci.org/yusufshakeel/dyreimage-php)\n[![npm version](https://img.shields.io/badge/npm-1.1.0-blue.svg)](https://www.npmjs.com/package/dyreimage-php)\n[![Bower](https://img.shields.io/badge/bower-1.1.0-blue.svg)](https://bower.io/search/?q=dyreimage-php)\n\n# Documentation\n[Click here for the documentation.](https://www.dyclassroom.com/dyreimage-php/getting-started)\n\n# Getting started\n- [Download the latest release.](https://github.com/yusufshakeel/dyreimage-php/releases)\n- Clone the repo: `git clone https://github.com/yusufshakeel/dyreimage-php.git`\n- Install with [Bower](https://bower.io): `bower install dyreimage-php`\n- Install with [npm](https://www.npmjs.com): `npm install dyreimage-php`\n- Install using composer `composer require yusufshakeel/dyreimage-php`\n\n# Requirement\nDYReImage requires the following:\n* PHP version 5.5 or higher.\n* GD extension.\n\n# Brief history\nI was working on an [Image Processing Project](https://github.com/yusufshakeel/Java-Image-Processing-Project) when I was in college back in 2014. Created this project back then and then decided to make some more changes and put it on GitHub.\n\n# What's inside\n```\ndyreimage-php/\n├── image/\n│   └── sample.jpeg\n├── src/\n│   └── DYReImage/\n│       ├── Core/\n│       │   ├── Config.php\n│       │   ├── Helper.php\n│       │   └── Validator.php\n│       ├── Utilities/\n│       │   ├── Image.php\n│       │   └── Resize.php\n│       ├── autoload.php\n│       └── DYReImage.php\n├── tests/\n└── index.php\n```\n\n# How to use?\nInclude the ```DYReImage``` directory which is inside the ```src``` directory in your project. Now to start using it write the following code.\n\n```\n\u003c?php\nrequire_once 'path/to/DYReImage/autoload.php';\n\n// path of source image file that we want to resize\n$source = 'path/to/image/sample.jpeg';\n\n// path of destination image file\n// resized image will be saved in img directory by the name output.png\n$destination = 'path/to/destination/img/output.png';\n\n// options to resize image\n// required image width = 400, height 200 (in pixels) and quality = 80\n$option = array(\n  \"height\" =\u003e 200,\n  \"width\" =\u003e 400,\n  \"quality\" =\u003e 80\n);\n\n// resize\ntry {\n  $obj = new DYReImage\\DYReImage($source, $destination, $option);\n  $obj-\u003eresize();\n} catch(\\Exception $e) {\n  die(\"Error: \" . $e-\u003egetMessage());\n}\n?\u003e\n```\nNote! You must have write permission in order to save the resized image in the destination directory.\n\n\n# Create grayscale image\n```\nrequire_once 'path/to/DYReImage/autoload.php';\n\n$source = 'path/to/image/sample.jpg';\n$destination = 'path/to/image/output.png';\n$option = array(\n\t\"quality\" =\u003e 80\n);\n\ntry {\n\t$obj = new DYReImage\\DYReImage($source, $destination, $option);\n\t$obj-\u003egrayscaleImage();\n} catch(\\Exception $e) {\n\tdie(\"Error: \" . $e-\u003egetMessage());\n}\n```\n\n\n# Create red image\n```\nrequire_once 'path/to/DYReImage/autoload.php';\n\n$source = 'path/to/image/sample.jpg';\n$destination = 'path/to/image/output.png';\n$option = array(\n\t\"quality\" =\u003e 80\n);\n\ntry {\n\t$obj = new DYReImage\\DYReImage($source, $destination, $option);\n\t$obj-\u003eredImage();\n} catch(\\Exception $e) {\n\tdie(\"Error: \" . $e-\u003egetMessage());\n}\n```\n\n\n# Create green image\n```\nrequire_once 'path/to/DYReImage/autoload.php';\n\n$source = 'path/to/image/sample.jpg';\n$destination = 'path/to/image/output.png';\n$option = array(\n\t\"quality\" =\u003e 80\n);\n\ntry {\n\t$obj = new DYReImage\\DYReImage($source, $destination, $option);\n\t$obj-\u003egreenImage();\n} catch(\\Exception $e) {\n\tdie(\"Error: \" . $e-\u003egetMessage());\n}\n```\n\n\n# Create blue image\n```\nrequire_once 'path/to/DYReImage/autoload.php';\n\n$source = 'path/to/image/sample.jpg';\n$destination = 'path/to/image/output.png';\n$option = array(\n\t\"quality\" =\u003e 80\n);\n\ntry {\n\t$obj = new DYReImage\\DYReImage($source, $destination, $option);\n\t$obj-\u003eblueImage();\n} catch(\\Exception $e) {\n\tdie(\"Error: \" . $e-\u003egetMessage());\n}\n```\n\n\n# License\n\nIt's free and released under [MIT License](https://github.com/yusufshakeel/dyreimage-php/blob/master/LICENSE)\nCopyright (c) 2017 Yusuf Shakeel\n\n# Buy me a cup of tea\n\nIf you enjoy watching my [YouTube](https://www.youtube.com/yusufshakeel) videos and find my projects here on [GitHub](https://github.com/yusufshakeel) interesting and helpful then feel free to buy me a cup of tea or coffee. It helps in creating more :)\n\n[Donate via PayPal](https://paypal.me/yusufshakeel)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusufshakeel%2Fdyreimage-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusufshakeel%2Fdyreimage-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusufshakeel%2Fdyreimage-php/lists"}