{"id":27063830,"url":"https://github.com/rvalla/chess.portraits","last_synced_at":"2025-07-16T12:05:38.544Z","repository":{"id":79185971,"uuid":"540943118","full_name":"rvalla/chess.portraits","owner":"rvalla","description":"A little project to use chess games to change images.","archived":false,"fork":false,"pushed_at":"2022-10-02T18:08:23.000Z","size":7890,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"themoststable","last_synced_at":"2025-04-05T16:38:17.995Z","etag":null,"topics":["chess","image-processing","python3"],"latest_commit_sha":null,"homepage":"https://azarte.gitlab.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvalla.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-24T19:24:03.000Z","updated_at":"2022-09-24T19:44:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"10a84975-3157-4e56-a979-d92852033fda","html_url":"https://github.com/rvalla/chess.portraits","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rvalla/chess.portraits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2Fchess.portraits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2Fchess.portraits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2Fchess.portraits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2Fchess.portraits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvalla","download_url":"https://codeload.github.com/rvalla/chess.portraits/tar.gz/refs/heads/themoststable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2Fchess.portraits/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265508234,"owners_count":23779101,"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":["chess","image-processing","python3"],"created_at":"2025-04-05T16:35:14.069Z","updated_at":"2025-07-16T12:05:38.505Z","avatar_url":"https://github.com/rvalla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://gitlab.com/azarte/chessportraits/-/raw/themoststable/assets/img/icon.png)\n\n# azarte: chessboard portraits\n\nThis is the code I use to make my series of **chessboard portraits**. Some of my photography work inspired\nby chess...  \nThe idea is to take fragments of a set of images and build a *chess board*. A *heat map* created using\na chess game moves introduce noise in some of the squares.  \n\n![example](https://gitlab.com/azarte/chessportraits/-/raw/themoststable/assets/img/example.jpg)\n\n## running the code\n\nTo create an image you need a set of square images and a chessgame in *pgn* format. First you need to\nload your configuration in a *json* file:  \n\n```\n{\n\t\"name\": \"test\",\n\t\"sq_size\": 128, //the size of each square in pixels\n\t\"size\": 1024,\t//the size of input images (note that 8 * sq_size = size)\n\t\"noise\": true, //you can set this to false, but that's boring\n\t\"noise_width\": 30, //maximum noise width (to change color's channels (0-255))\n\t\"input_path\": \"input/img/test\", //the folder with input images\n\t\"output_path\": \"output/img/test\", //the output folder\n\t\"output_file\": \"test_1\", //you need an output name\n\t\"game_path\": \"input/pgn/pgn_source_00643.pgn\", //path to the chessgame\n\t\"piece_weight\": \"1,3,3,5,9,9\" //relative pieces weight to calculate the heatmap\n}\n```\n\nAnd then you simply run something like:  \n\n```\nfrom chessboard_portrait import Portrait\np = Portrait(\"input/test.json\")\n```\n\n## standing upon the shoulders of giants\n\nThis little project is possible thanks to a lot of work done by others in the *open-source* community. Particularly in\nthis case I need to mention:\n\n- [**Python**](https://www.python.org/): the programming language I used.  \n- [**python-chess**](https://github.com/niklasf/python-chess): the library which helps me to process chess moves.  \n\nFeel free to contact me by [mail](mailto:rodrigovalla@protonmail.ch) or reach me in\n[telegram](https://t.me/rvalla) or [mastodon](https://fosstodon.org/@rvalla).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvalla%2Fchess.portraits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvalla%2Fchess.portraits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvalla%2Fchess.portraits/lists"}