{"id":13501556,"url":"https://github.com/nuno-faria/tiler","last_synced_at":"2025-05-14T14:08:22.576Z","repository":{"id":38185009,"uuid":"206990697","full_name":"nuno-faria/tiler","owner":"nuno-faria","description":"👷 Build images with images","archived":false,"fork":false,"pushed_at":"2023-10-31T13:55:47.000Z","size":13652,"stargazers_count":5977,"open_issues_count":14,"forks_count":428,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-04-11T23:00:04.142Z","etag":null,"topics":["cross-stitch","image-builder","image-processing","lego","minecraft","mosaic-images","opencv","python","tiling"],"latest_commit_sha":null,"homepage":null,"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/nuno-faria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-07T15:52:25.000Z","updated_at":"2025-04-11T13:15:18.000Z","dependencies_parsed_at":"2024-01-07T21:14:43.038Z","dependency_job_id":null,"html_url":"https://github.com/nuno-faria/tiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuno-faria%2Ftiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuno-faria%2Ftiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuno-faria%2Ftiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuno-faria%2Ftiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuno-faria","download_url":"https://codeload.github.com/nuno-faria/tiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159761,"owners_count":22024564,"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":["cross-stitch","image-builder","image-processing","lego","minecraft","mosaic-images","opencv","python","tiling"],"created_at":"2024-07-31T22:01:41.483Z","updated_at":"2025-05-14T14:08:22.560Z","avatar_url":"https://github.com/nuno-faria.png","language":"Python","funding_links":[],"categories":["Python","其他_机器视觉"],"sub_categories":["网络服务_其他"],"readme":"![title](images/title_stripes.png)\n\n👷 Build images with images.\n\n\n## About\n\nTiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).\n\nAn image can be built out of circles, lines, waves, cross stitches, legos, minecraft blocks, paper clips, letters, ... The possibilities are endless!\n\n\n## Installation\n\n- Clone the repo: `git clone https://github.com/nuno-faria/tiler.git`;\n- Install Python 3;\n- Install pip (optional, to install the dependencies);\n- Install dependencies: `pip install -r requirements.txt`\n\n## Usage\n\n- Make a folder with the tiles (and only the tiles) to build the image;\n    - The script `gen_tiles.py` can help in this task; it builds tiles with multiple colors based on the source tile (note: its recommended for the source file to have an RGB color of (240,240,240)). It is used as `python gen_tiles.py path/to/image` and creates a folder with a 'gen_' prefix in the same path as the base image.\n- Run `python tiler.py path/to/image path/to/tiles_folder/`.\n\n## Configuration\n\nAll configurations can be changed in the `conf.py` file.\n\n#### `gen_tiles.py`\n\n- `DEPTH` - number of divisions in each color channel (ex: DEPTH = 4 -\u003e 4 * 4 * 4 = 64 colors);\n- `ROTATIONS` - list of rotations, in degrees, to apply over the original image (ex: [0, 90]).\n\n#### `tiler.py`\n\n- `COLOR_DEPTH` - number of divisions in each color channel (ex: COLOR_DEPTH = 4 -\u003e 4 * 4 * 4 = 64 colors);\n- `IMAGE_SCALE` - scale to apply to the image to tile (1 = default scale);\n- `RESIZING_SCALES` - scale to apply to each tile (ex: [1, 0.75, 0.5, 0.25]);\n- `PIXEL_SHIFT` - number of pixels shifted to create each box (ex: (5,5)); if None, shift will be the same as the tile dimension);\n    \u003cimg src=\"images/pixel_shift.png\" width=\"100%\"\u003e\n- `OVERLAP_TILES` - if tiles can overlap;\n- `RENDER` - render image as its being built;\n- `POOL_SIZE` - multiprocessing pool size;\n- `IMAGE_TO_TILE` - image to tile (ignored if passed as the 1st arg);\n- `TILES_FOLDER` - folder with tiles (ignored if passed as the 2nd arg);\n- `OUT` - result image filename.\n\n\n## Examples\n\n### Circles\n\n#### Various sizes\n\n\u003cimg src=\"images/cake_circles.png\" width=\"40%\"\u003e\n\n[Original](https://www.flaticon.com/free-icon/cake_1102780) cake image by [pongsakornred](https://www.flaticon.com/authors/pongsakornred) from [FLATICON](https://www.flaticon.com).\n\n#### Fixed\n\n- 10x10\n\u003cimg src=\"images/cake_circles_simple.png\" width=\"40%\"\u003e\n\u003cimg src=\"images/starry_night_circles_10x10.png\" width=\"100%\"\u003e\n- 25x25\n\u003cimg src=\"images/starry_night_circles_25x25.png\" width=\"100%\"\u003e\n- 50x50\n\u003cimg src=\"images/starry_night_circles_50x50.png\" width=\"100%\"\u003e\n\n\n### Paper clips\n\n\u003cimg src=\"images/cake_clips.png\" width=\"40%\"\u003e\n\n\n### Cross stitch (times)\n\n\u003cimg src=\"images/cake_times.png\" width=\"40%\"\u003e\n\n\u003cimg src=\"images/starry_night_times.png\" width=\"100%\"\u003e\n\n\n### Hearts\n\n\u003cimg src=\"images/heart_hearts.png\" width=\"40%\"\u003e\n\n\n### Legos\n\n\u003cimg src=\"images/cake_lego.png\" width=\"40%\"\u003e\n\u003cimg src=\"images/starry_night_lego.png\" width=\"100%\"\u003e\n\n\n### Minecraft blocks\n\n\u003cimg src=\"images/cake_minecraft.png\" width=\"40%\"\u003e\n\u003cimg src=\"images/starry_night_minecraft.png\" width=\"100%\"\u003e\n\n\n### Stripes (lines)\n\n\u003cimg src=\"images/cake_stripes.png\" width=\"50%\"\u003e\n\n\n### At\n\n\u003cimg src=\"images/github_logo_at.png\" width=\"50%\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuno-faria%2Ftiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuno-faria%2Ftiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuno-faria%2Ftiler/lists"}