{"id":15066748,"url":"https://github.com/johnanon9771/mockup-generator","last_synced_at":"2025-07-17T06:03:13.141Z","repository":{"id":257028917,"uuid":"855509233","full_name":"JohnAnon9771/mockup-generator","owner":"JohnAnon9771","description":"MockupGenerator is a Ruby tool that generates realistic mockups from templates, masks and graphic arts using the RMagick library.","archived":false,"fork":false,"pushed_at":"2024-09-15T15:30:58.000Z","size":7438,"stargazers_count":15,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T14:13:47.143Z","etag":null,"topics":["rmagick","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnAnon9771.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T01:33:07.000Z","updated_at":"2025-04-02T22:43:24.000Z","dependencies_parsed_at":"2024-09-29T11:33:55.101Z","dependency_job_id":null,"html_url":"https://github.com/JohnAnon9771/mockup-generator","commit_stats":null,"previous_names":["johnanon9771/mockup-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JohnAnon9771/mockup-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnAnon9771%2Fmockup-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnAnon9771%2Fmockup-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnAnon9771%2Fmockup-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnAnon9771%2Fmockup-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnAnon9771","download_url":"https://codeload.github.com/JohnAnon9771/mockup-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnAnon9771%2Fmockup-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265570944,"owners_count":23789983,"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":["rmagick","ruby"],"created_at":"2024-09-25T01:11:30.796Z","updated_at":"2025-07-17T06:03:13.099Z","avatar_url":"https://github.com/JohnAnon9771.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MockupGenerator\n\nMockupGenerator is a Ruby tool that generates realistic mockups from templates, masks, and artworks using the RMagick library.\n\n## Table of Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Results](#results)\n- [Explanation of Steps](#explanation-of-steps)\n\n## Features\n\n- Generates adjustment, displacement, and lighting maps to create realistic mockups.\n- Supports customization of templates and artworks.\n- Uses algorithms to calculate average brightness and adjust the mockup accordingly.\n\n## Requirements\n\n- Ruby (version 2.5 or higher)\n- `rmagick` gem\n- ImageMagick installed on the system\n\n## Installation\n\n1. **Install ImageMagick** on your system:\n\n   - **macOS**:\n\n     ```bash\n     brew install imagemagick\n     ```\n\n   - **Ubuntu/Debian**:\n\n     ```bash\n     sudo apt-get install imagemagick\n     ```\n\n2. **Install the RMagick gem**:\n\n   ```bash\n   gem install rmagick\n   ```\n\n3. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/your_username/MockupGenerator.git\n   ```\n\n4. **Navigate to the project directory**:\n\n   ```bash\n   cd MockupGenerator\n   ```\n\n## Usage\n\n```ruby\nrequire 'rmagick'\nrequire './mockup_generator'\n\n# Paths to the files\ntemplate = \"/path/to/template.jpg\"\nmask = \"/path/to/mask.png\"\nartwork = \"/path/to/artwork.png\"\n\n# Initialize the mockup generator\ngenerator = MockupGenerator.new(template, mask, artwork)\n\n# Generate the mockup\ngenerator.generate\n```\n\nThe generated files will be saved in the current directory:\n\n- `adjustment_map.jpg`\n- `displacement_map.png`\n- `lighting_map.png`\n- `mockup.png`\n\n## Examples\n\n### Template\n\nBase image where the artwork will be applied.\n\n![Template](assets/mug/template.jpg)\n\n### Mask\n\nDefines the area where the artwork will be positioned on the template.\n\n![Mask](assets/mug/mask.png)\n\n### Artwork\n\nThe image that will be inserted into the mockup.\n\n![Artwork](assets/mug/artwork.png)\n\n## Results\n\nAfter running the script, you will get a mockup with the artwork applied realistically.\n\n![Generated Mockup](assets/mug/mockup.png)\n\n## Explanation of Steps\n\n1. **Generation of Adjustment Map**: Creates a map that adjusts the brightness and contrast of the artwork to match the template.\n\n2. **Generation of Displacement Map**: Applies a displacement effect to simulate the texture and contours of the template on the artwork.\n\n3. **Generation of Lighting Map**: Adjusts the lighting of the artwork to correspond with the lighting of the template.\n\n4. **Generation of the Final Mockup**: Combines all the maps and applies the artwork to the template, producing the final mockup.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnanon9771%2Fmockup-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnanon9771%2Fmockup-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnanon9771%2Fmockup-generator/lists"}