{"id":19217053,"url":"https://github.com/shellvon/photo-maker","last_synced_at":"2025-10-28T00:39:12.387Z","repository":{"id":71590737,"uuid":"142094255","full_name":"shellvon/photo-maker","owner":"shellvon","description":"A Dead Simple Photo Maker","archived":false,"fork":false,"pushed_at":"2018-07-31T01:14:24.000Z","size":24696,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T23:43:23.768Z","etag":null,"topics":["ascii-art","mosaic-images","photo-collage","python-script"],"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/shellvon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-24T02:34:03.000Z","updated_at":"2023-08-16T09:13:47.000Z","dependencies_parsed_at":"2023-06-26T01:45:13.056Z","dependency_job_id":null,"html_url":"https://github.com/shellvon/photo-maker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shellvon/photo-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellvon%2Fphoto-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellvon%2Fphoto-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellvon%2Fphoto-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellvon%2Fphoto-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellvon","download_url":"https://codeload.github.com/shellvon/photo-maker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellvon%2Fphoto-maker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281366885,"owners_count":26488696,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"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":["ascii-art","mosaic-images","photo-collage","python-script"],"created_at":"2024-11-09T14:19:58.235Z","updated_at":"2025-10-28T00:39:12.351Z","avatar_url":"https://github.com/shellvon.png","language":"Python","readme":"# 前言\n\nPhoto-Maker 是一个用于生成和制作各种有趣的图片脚本， 使用 Python 编写，能运行在Python2 \u0026 Python 3 之上。但均依赖 PIL 库。请自行安装。除了 PIL 之外无需引入其他依赖。\n\n\n\n目前引入的功能有:\n\n+ 微信朋友圈心❤️型九宫格图\n+ [蒙太奇(马赛克)照片 ](https://www.wikiwand.com/zh-hans/%E7%9B%B8%E7%89%87%E9%A6%AC%E8%B3%BD%E5%85%8B)\n+ 拆分图 (可以将一张图拆分为M x N 张图)\n+ ASCII 图  将一张图转化为ASCII码\n\n\n\n# 使用方式\n\n请执行 `python photo-maker.py -h` 查看帮助。\n\n```\nusage: photo-maker.py [-h] {heart,split,mosaic,ascii} ...\n\n            A Dead Simple Photo Maker\n===========================================================\n______ _           _             ___  ___      _\n| ___ \\ |         | |            |  \\/  |     | |\n| |_/ / |__   ___ | |_ ___ ______| .  . | __ _| | _____ _ __\n|  __/| '_ \\ / _ \\| __/ _ \\______| |\\/| |/ _` | |/ / _ \\ '__|\n| |   | | | | (_) | || (_) |     | |  | | (_| |   \u003c  __/ |\n\\_|   |_| |_|\\___/ \\__\\___/      \\_|  |_/\\__,_|_|\\_\\___|_|\n\nThe most commonly used photo-maker commands are:\n    heart      Use multi image files to generate a heart picture\n    split      Split one image into A x B multi grid pictures\n    mosaic     Generate a mosaic photo by use tiles\n    ascii      Convert an image to ascii text\n\npositional arguments:\n  {heart,split,mosaic,ascii}\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nSource Code: http://github.com/shellvon/photo-maker\n```\n\n\n\n# Examples\n\n所有的例子输出均放在了 [examples](./exmamples) 目录下，可自行查看。\n\n## 微信❤️型九宫格\n\n```\nusage: photo-maker.py heart [-h] [-d DIR] [--autofill] [--padding PADDING]\n                            [--size SIZE] [-s]\n                            [-e EXTENSIONS [EXTENSIONS ...]] [--intermediate]\n                            [-o OUTPUT]\n\n微信心型九空格图片,一共是分享的9张,每一张也是9格图\n如下图，需要填满的位置是X所在的位置:\n\nFig 1:              Fig 2:         Fig 3:\n+---+---+---+   +---+---+---+   +---+---+---+\n| 1 | 2 | 3 |   | 1 | 2 | 3 |   | 1 | 2 | 3 |\n+-----------+   +-----------+   +-----------+\n| 4 | 5 | x |   | x | 5 | x |   | x | 5 | 6 |\n+-----------+   +-----------+   +-----------+\n| 7 | x | x |   | x | x | x |   | x | x | 9 |\n+-----------+   +-----------+   +-----------+\n\nFig 4:              Fig 5:         Fig 6:\n+---+---+---+   +---+---+---+   +---+---+---+\n| x | x | x |   | x | x | x |   | x | x | x |\n+-----------+   +-----------+   +-----------+\n| x | x | x |   | x | x | x |   | x | x | x |\n+-----------+   +-----------+   +-----------+\n| 7 | x | x |   | x | x | x |   | x | x | 9 |\n+-----------+   +-----------+   +-----------+\n\nFig 7:              Fig 8:         Fig 9:\n+---+---+---+   +---+---+---+   +---+---+---+\n| 1 | 2 | x |   | x | x | x |   | x | 2 | 3 |\n+-----------+   +-----------+   +-----------+\n| 4 | 5 | 6 |   | x | x | x |   | 4 | 5 | 6 |\n+-----------+   +-----------+   +-----------+\n| 7 | 8 | 9 |   | 7 | x | 9 |   | 7 | 8 | 9 |\n+-----------+   +-----------+   +-----------+\n             ^^^\n              |\n              +----- 每一张图的间隔称之为 Padding\n\n因此一共需要的图片张数是: (3 * 2) + 5 + (8 * 2) + 9 + (1 * 2) + 7 = 45 张图.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d DIR, --dir DIR     directory of the images, default is current dir\n  --autofill            autofill pictures when picture is too few, default is\n                        False\n  --padding PADDING     padding size between each grid, default is 10\n  --size SIZE           output image size，format is AxB, default size is:\n                        1920x1920\n  -s, --shuffle         shuffle the image file list\n  -e EXTENSIONS [EXTENSIONS ...], --extensions EXTENSIONS [EXTENSIONS ...]\n                        image file type, default is png,jpg,jpeg\n  --intermediate        save intermediate file, default is False\n  -o OUTPUT, --output OUTPUT\n                        output image filename, default is collage.png\n```\n\n\n![heart.png](./examples/heart.png)\n\n\n\n# Split 拆分图\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"width: 200px\" src=\"./examples/grid_0.png\" \u003e\n\u003cimg width=\"width: 200px\" src=\"./examples/grid_1.png\"\u003e\n\u003cimg width=\"width: 200px\" src=\"./examples/grid_2.png\" \u003e\n\u003cimg width=\"width: 200px\" src=\"./examples/grid_3.png\"\u003e\n\u003c/div\u003e\n\n\n# 相片马赛克\n\n由于马赛克需要许多小图，因此此脚本默认提供了800+张emoji表情用于当tile,您可以自己提供自己的图片文件夹进行制作tile.需要注意的是文件不要太大，否则会很慢。\n\n![mosaic](./examples/mosaic.png)\n\n\n# ASCII Art\n\n源图片来自: [examples/sharp.png](./examples/sharp.png)\n\n\n![examples/sharp.png](./examples/sharp.png)\n\n```\n------------------------------------------------\n--/qqQUUzx/|)))))))))))))))))))))))))))))(\\jvUJU\n--n$$kYf(1[_~\u003c\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003c\u003c+?1)\\vO\n--n@Q\\1]!::Ill!!!!!!!!!!!!!!!!!!!!!!!!!!lI;,I_{(\n--nC({\u003c:i\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003eIl}\n--(|{_l\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003ei\n--{(}~\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c~~~~\u003c~\u003c\u003c\u003c~~~~~\u003c~\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003e\n--{)}_~~~~~~~~~~~~~~~+:   ;~~~~_`   I~~~~~~~~~~\u003c\n--{({-+++++++++++++++_.  .~++++\u003e   .~+++++++++++\n--{({-_______________!   ,____-:   ;____________\n--{(1]---------+~~~~+`   l~~~~~.   !~~~\u003c?------?\n--{|1{[????????\"                        ]?????]}\n--{|1{}}}[[]]]]~\u003c\u003c\u003c~^   I\u003c\u003c\u003c\u003c~.   !\u003c\u003c\u003c\u003c\u003c]]][}}}{\n--{\\){{{{{{{{{}}}}}}.  '][[[[_   `[}}}}{{{{{{{{{\n--{\\)1{{{{{{{1]]]]]!   :]]]][,   ;]]]]{{{{{{{{{1\n--1\\(11111111?                        ~111111111\n--1/()1111111}++++!   ,++++_,   :+++++[111111111\n--1/())))))))))))|,   _))))|.   ?)))))))))))))))\n--1t|()))))))))))1   `))))(-   ^))))))))))))))))\n--1t|())))))))))(i   \u003e))))|\"   ~)))))))))))))))(\n--)t\\((((((((((((}}}})(((()}}}})((((((((((((((((\n--fx\\|(((((((((((((((((((((((((((((((((((((((((|\n--nkj\\|||||||||||||||||||||||||||||||||||||||||\\\n--n$*c/\\||||||||||||||||||||||||||||||||||||||\\r\n```\n\n现在, 您可以自己指定grey-scale来输出你要的照片了.\n\n![examples/custom_grey_scale.png](./examples/custom_grey_scale.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellvon%2Fphoto-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellvon%2Fphoto-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellvon%2Fphoto-maker/lists"}