{"id":21206193,"url":"https://github.com/rtmigo/img2texture","last_synced_at":"2025-05-12T14:32:25.644Z","repository":{"id":61264117,"uuid":"409390794","full_name":"rtmigo/img2texture","owner":"rtmigo","description":"CLI for converting images to seamless tiles","archived":false,"fork":false,"pushed_at":"2023-10-07T14:57:52.000Z","size":2152,"stargazers_count":81,"open_issues_count":1,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T05:18:36.653Z","etag":null,"topics":["3d","alpha","blending","cli","gradient","image","image-processing","imaging","jpeg","jpg","overlay","pattern","photo","pil","python","raster","seamless","texture","tile","tileable"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/img2texture","language":"Python","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/rtmigo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-09-23T00:01:22.000Z","updated_at":"2025-03-18T06:10:28.000Z","dependencies_parsed_at":"2022-10-13T19:46:12.403Z","dependency_job_id":null,"html_url":"https://github.com/rtmigo/img2texture","commit_stats":{"total_commits":104,"total_committers":2,"mean_commits":52.0,"dds":0.3942307692307693,"last_synced_commit":"25995815af8bb3475124cdbe2b56ba904a5c7ef6"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fimg2texture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fimg2texture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fimg2texture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fimg2texture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtmigo","download_url":"https://codeload.github.com/rtmigo/img2texture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754959,"owners_count":21958933,"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":["3d","alpha","blending","cli","gradient","image","image-processing","imaging","jpeg","jpg","overlay","pattern","photo","pil","python","raster","seamless","texture","tile","tileable"],"created_at":"2024-11-20T20:54:46.309Z","updated_at":"2025-05-12T14:32:25.571Z","avatar_url":"https://github.com/rtmigo.png","language":"Python","readme":"[![PyPI version shields.io](https://img.shields.io/pypi/v/img2texture.svg)](https://pypi.python.org/pypi/img2texture/)\n[![Generic badge](https://img.shields.io/badge/Python-3.8+-blue.svg)](#)\n[![Generic badge](https://img.shields.io/badge/OS-Windows%20|%20macOS%20|%20Linux-blue.svg)](#)\n[![Downloads](https://pepy.tech/badge/img2texture/month)](https://pepy.tech/project/img2texture)\n\n# [img2texture](https://github.com/rtmigo/img2texture#readme)\n\nCommand line utility for converting images to seamless tiles.\nIt overlays images with an alpha gradient.\n\nThe resulting tiles can be used as textures in games, compositing and 3D modeling applications, etc.\n\n\n\n*⚠️ If the images below are not displayed, check out the \n[original of this document on GitHub](https://github.com/rtmigo/img2texture#readme).*\n\n### Original image x4\n\n![Source tiled](docs/1_orion_src_2x2.jpg)\n\nOrion galaxy by NASA/ESA, in four copies side by side. \n\nWe cannot use the original image as an endless space background: the seams are visible.\n\n### Converted image x4\n\n![Converted tiled](docs/2_orion_seamless_2x2.jpg)\n\nThe result of `img2texture`, in four copies side by side. \n\nThe image is slightly reduced in size and the edges are modified with \nalpha-blending.\n\nThe converted image can be tiled and panned in any \ndirection. It will feel endless and seamless.\n\n# Install\n\nThe easiest way is to download and extract a [binary executable](https://github.com/rtmigo/img2texture/releases):\n\n* [for macOS](https://github.com/rtmigo/img2texture/releases/latest/download/img2texture_darwin_amd64.tgz)\n* [for Linux](https://github.com/rtmigo/img2texture/releases/latest/download/img2texture_linux_amd64.tgz)\n* [for Windows](https://github.com/rtmigo/img2texture/releases/latest/download/img2texture_windows_amd64.zip)\n\nOr install as a Python package:\n\n```bash\npip3 install img2texture\n```\n\n# Run\n\nCreate new `seamless.jpg` from `source.jpg`.\n```bash\nimg2texture /path/to/source.jpg /path/to/seamless.jpg \n```\n\n## --overlap\n\nThe `--overlap` option determines how much of the image will be used to hide the seams.\n\nFor example, the following command uses 25% of the width and 25% of the height \nof the original image:\n\n```bash\nimg2texture source.jpg seamless.jpg --overlap 0.25 \n```\n\nIncreasing the value makes the seam less visible. However, the image becomes smaller.\n\n\u003cdetails\u003e\n  \u003csummary\u003eSample images\u003c/summary\u003e\n\n*⚠️ If the images below are not displayed, check out the \n[original of this document on GitHub](https://github.com/rtmigo/img2texture#readme).*\n\n\n### --overlap 0.05\n\n5% of the width and 5% of the height are used to mask the seam.\n\n![--overlap 0.05](docs/3_orion_05_2x2.jpg)\n\n\n\n### --overlap 0.4\n\n40% of the width and 40% of the height are used to mask the seam.\n\n![--overlap 40](docs/3_orion_40_2x2.jpg)\n\n\u003c/details\u003e\n\n## --tile\n\nThe `--tile` option will create a 2x2 tiled version in addition to the converted image.\n\nThe following command will create `seamless.jpg` and `seamless_2x2.jpg`. \n\n```bash\nimg2texture source.jpg seamless.jpg --tile \n```\n\nAll the samples on this page were created with `--tile`.\n\n# Use programmatically\n\nIf you don't need CLI but need to create seamless image in your own program:\n\n```python3\nfrom PIL import Image\nfrom img2texture import image_to_seamless\n\n# load PIL image\nsrc_image = Image.open(\"/path/to/source.png\")\n\n# convert to seamless PIL image\nresult_image = image_to_seamless(src_image, overlap=0.1)\n\n# save\nresult_image.save(\"/path/to/result.png\")\n```\n\n`overlap=0.1` means 10%, and `overlap=(0.1, 0.2)` means 10% horizontal, 20% vertical. \n\n# License\n\nCopyright © 2021 [Artёm iG](https://github.com/rtmigo).\nReleased under the [MIT License](LICENSE).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtmigo%2Fimg2texture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtmigo%2Fimg2texture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtmigo%2Fimg2texture/lists"}