{"id":19326135,"url":"https://github.com/bartko-s/stefano-image","last_synced_at":"2026-07-22T19:32:16.514Z","repository":{"id":8871090,"uuid":"10584886","full_name":"bartko-s/stefano-image","owner":"bartko-s","description":"PHP image resizer","archived":false,"fork":false,"pushed_at":"2022-10-01T10:31:58.000Z","size":1550,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T15:32:05.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kweiberth/react-todo-list","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartko-s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-09T15:18:31.000Z","updated_at":"2022-10-01T10:27:27.000Z","dependencies_parsed_at":"2022-08-28T04:41:20.418Z","dependency_job_id":null,"html_url":"https://github.com/bartko-s/stefano-image","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bartko-s/stefano-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartko-s","download_url":"https://codeload.github.com/bartko-s/stefano-image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35775332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T02:12:34.941Z","updated_at":"2026-07-22T19:32:16.498Z","avatar_url":"https://github.com/bartko-s.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Stefano Image\r\n=============\r\n\r\n[![Build Status](https://app.travis-ci.com/bartko-s/stefano-image.svg?branch=master)](https://app.travis-ci.com/bartko-s/stefano-image)\r\n[![Coverage Status](https://coveralls.io/repos/bartko-s/stefano-image/badge.png?branch=master)](https://coveralls.io/r/bartko-s/stefano-image?branch=master) \r\n\r\nFeatures\r\n--------\r\n- Resize and save image\r\n- Add watermark\r\n- Supported input and output format jpg, png, gif\r\n\r\nDependencies\r\n------------\r\n- php GD2 extension\r\n\r\nInstalation using Composer\r\n--------------------------\r\n1. Run command ``` composer require stefano/stefano-image ```\r\n\r\nUsage\r\n-----\r\n\r\nThis is the original image\r\n\r\n\u003cimg src=\"./doc/images/source.jpeg\" /\u003e\r\n\r\n- resize and keep source image aspect ration\r\n\r\n```\r\n$maxWidth = 200;\r\n$maxHeight = 200;\r\n$resizer = new \\StefanoImage\\Image();\r\n$resizer-\u003esourceImage($sourceImage)\r\n        -\u003eresize($maxWidth, $maxHeight)\r\n        -\u003esave($outputDir, $name);\r\n```\r\n\r\nThis is the output\r\n\r\n\u003cimg src=\"./doc/images/resize.jpeg\" /\u003e\r\n\r\n- adaptive resize\r\n\r\n```\r\n$width = 200;\r\n$height = 50;\r\n$resizer = new \\StefanoImage\\Image();\r\n$resizer-\u003esourceImage($sourceImage)\r\n        -\u003eadaptiveResize($width, $height)\r\n        -\u003esave($outputDir, $name);\r\n```\r\n\r\nThis is the output\r\n\r\n\u003cimg src=\"./doc/images/adaptive-resize.jpeg\" /\u003e\r\n\r\n- pad\r\n\r\n```\r\n$width = 200;\r\n$height = 200;\r\n$resizer = new \\StefanoImage\\Image();\r\n$resizer-\u003esourceImage($sourceImage)\r\n        -\u003epad($width, $height)\r\n        -\u003esave($outputDir, $name);\r\n```\r\n\r\nThis is the output\r\n\r\n\u003cimg src=\"./doc/images/pad.jpeg\" /\u003e\r\n\r\n- pad and change background color\r\n\r\n```\r\n$width = 350;\r\n$height = 150;\r\n$resizer = new \\StefanoImage\\Image();\r\n$resizer-\u003esourceImage($sourceImage)\r\n        -\u003epad($width, $height)\r\n        -\u003ebackgroundColor(35, 210, 240)\r\n        -\u003esave($outputDir, $name);\r\n```\r\n\r\nThis is the output\r\n\r\n\u003cimg src=\"./doc/images/pad-2.jpeg\" /\u003e\r\n\r\n- add watermark\r\n\r\n```\r\n$maxWidth = 350;\r\n$maxHeight = 150;\r\n$maxWidthPercent = 40;\r\n$maxHeightPercent = 40;\r\n$opacity = 30;\r\n$watermarkPosition = \\StefanoImage\\Image::WATERMARK_POSITION_TOP_RIGHT;\r\n$resizer = new \\StefanoImage\\Image();\r\n$resizer-\u003esourceImage($sourceImage)\r\n        -\u003eresize($maxWidth, $maxHeight)\r\n        -\u003eaddWatermark($watermark, $maxWidthPercent, $maxHeightPercent, $opacity, $watermarkPosition)\r\n        -\u003esave($outputDir, $name);\r\n```\r\n\r\nThis is the output\r\n\r\n\u003cimg src=\"./doc/images/watermark.jpeg\" /\u003e\r\n\r\n- change output format\r\n\r\n```\r\n$resizer-\u003eoutputFormat(\\StefanoImage\\Image::OUTPUT_FORMAT_PNG);\r\n```\r\n\r\n- change output quality\r\n\r\n```\r\n$resizer-\u003equality(15);\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartko-s%2Fstefano-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartko-s%2Fstefano-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartko-s%2Fstefano-image/lists"}