{"id":19509998,"url":"https://github.com/zhanziyuan/pixelpuzzle","last_synced_at":"2026-05-17T19:35:54.294Z","repository":{"id":240324065,"uuid":"802091948","full_name":"ZhanZiyuan/PixelPuzzle","owner":"ZhanZiyuan","description":"Shuffle/recover the pixels of images.","archived":false,"fork":false,"pushed_at":"2025-08-23T02:40:40.000Z","size":34347,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T18:54:22.383Z","etag":null,"topics":["anime","encryption","image","image-processing","numpy","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pixelpuzzle/","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/ZhanZiyuan.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,"zenodo":null}},"created_at":"2024-05-17T14:03:29.000Z","updated_at":"2025-10-14T10:45:00.000Z","dependencies_parsed_at":"2024-06-13T10:02:37.775Z","dependency_job_id":"ce8605ee-8e85-4497-99b0-742b3033807b","html_url":"https://github.com/ZhanZiyuan/PixelPuzzle","commit_stats":null,"previous_names":["zhanziyuan/pixelpuzzle"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ZhanZiyuan/PixelPuzzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhanZiyuan%2FPixelPuzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhanZiyuan%2FPixelPuzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhanZiyuan%2FPixelPuzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhanZiyuan%2FPixelPuzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZhanZiyuan","download_url":"https://codeload.github.com/ZhanZiyuan/PixelPuzzle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhanZiyuan%2FPixelPuzzle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["anime","encryption","image","image-processing","numpy","python"],"created_at":"2024-11-10T23:14:08.612Z","updated_at":"2026-05-17T19:35:54.263Z","avatar_url":"https://github.com/ZhanZiyuan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"logo\" src=\"https://github.com/ZhanZiyuan/PixelPuzzle/raw/main/assets/logo.svg\"\n        width=\"138\" /\u003e\n\u003c/p\u003e\n\n# PixelPuzzle\n\n[![GitHub Actions Workflow Status](https://github.com/ZhanZiyuan/PixelPuzzle/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ZhanZiyuan/PixelPuzzle/blob/main/.github/workflows/python-publish.yml)\n[![GitHub last commit](https://img.shields.io/github/last-commit/ZhanZiyuan/PixelPuzzle)](https://github.com/ZhanZiyuan/PixelPuzzle/commits/main/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pixelpuzzle)](https://pypi.org/project/pixelpuzzle/)\n[![PyPI - Version](https://img.shields.io/pypi/v/pixelpuzzle)](https://pypi.org/project/pixelpuzzle/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/pixelpuzzle)](https://pypi.org/project/pixelpuzzle/#files)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pixelpuzzle)](https://pypistats.org/packages/pixelpuzzle)\n[![GitHub License](https://img.shields.io/github/license/ZhanZiyuan/PixelPuzzle)](https://github.com/ZhanZiyuan/PixelPuzzle/blob/main/LICENSE)\n\nEncode/decode images using Base64\nor shuffle/recover the pixels of images.\n\n## Motivations\n\nThis repository is a renewed implementation\nof Python code I saw a long time ago on [CoolApk](https://www.coolapk.com/):\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom PIL import Image\n\n# Get the three-dimensional pixel channel matrix of the image\nimg = np.array(Image.open(\"C:/Users/user/Downloads/test.png\"))\n# First dimension\nrow_len = img.shape[0]\n\n# Shuffle the dimension indices\nrow_index = np.random.permutation(row_len)\n# Generate the chaotic image\nimg_chaos = img[row_index, :, :]\n\n# Use sorting to unshuffle the image\nimg_sort = img[np.sort(row_index), :, :]\n\n# Plot the chaotic and unshuffled images\nplt.figure(\"Chaotic and Unshuffled Images\")\nplt.subplot(121)\nplt.imshow(img_chaos)\nplt.subplot(122)\nplt.imshow(img_sort)\nplt.show()\n```\n\nAnd it can also be seen as an implementation\nof similar functions of the Android application\n[图片混淆](https://www.coolapk.com/feed/27933328?shareKey=N2QxMWY3MTExMDc0NjY0OWQwYWE)\nin Python.\n\n## Installation\n\nPixelPuzzle can be installed\nfrom [PyPI](https://pypi.org/project/pixelpuzzle/):\n\n```bash\npip install pixelpuzzle\n```\n\nor download the repository and run:\n\n```bash\npip install .\n```\n\nas of the repository root folder.\n\n## Examples\n\n- The original image:\n\n    ![The original image](https://github.com/ZhanZiyuan/PixelPuzzle/raw/main/examples/original.png \"original\")\n\n- The shuffled image (using the random seed `0721`):\n\n    ![The shuffled image](https://github.com/ZhanZiyuan/PixelPuzzle/raw/main/examples/shuffled.png \"shuffled\")\n\n- The recovered image:\n\n    ![The recovered image](https://github.com/ZhanZiyuan/PixelPuzzle/raw/main/examples/recovered.png \"recovered\")\n\n## Packaging\n\nThe binaries are created with\n~~[Nuitka](https://github.com/Nuitka/Nuitka)~~\n[PyInstaller](https://github.com/pyinstaller/pyinstaller):\n\n```bash\n# Package it on Linux\npyinstaller --name PixelPuzzle --onefile -p pixelpuzzle pixelpuzzle/__main__.py\n\n# Package it on Windows\npyinstaller --name PixelPuzzle --onefile --icon python.ico -p pixelpuzzle pixelpuzzle/__main__.py\n```\n\n## Web Applications\n\nDeploy [Pixel Puzzle](https://pixelpuzzle-web.vercel.app/)\non [Vercel](https://github.com/vercel/vercel).\n\n## Similar Projects\n\nHere are some links to other similar projects that I am aware of:\n\n- [PicEncryptApp](https://github.com/goldsudo/PicEncryptApp)\n- [piConfuse](https://github.com/Conyrol/piConfuse)\n- [Jencryption](https://github.com/Jinnrry/Jencryption)\n- [RicEncrypt](https://github.com/NaviHX/ricencrypt)\n\n## Copyrights\n\nPixelPuzzle is a free, open-source software package\n(distributed under the [GPLv3 license](./LICENSE)).\nThe sample image used is downloaded from\n[satchely doki doki literature club! natsuki](https://yande.re/post/show/465068).\nThe Python icon is downloaded from\n[python.ico](https://github.com/python/cpython/blob/main/PC/icons/python.ico).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanziyuan%2Fpixelpuzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhanziyuan%2Fpixelpuzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanziyuan%2Fpixelpuzzle/lists"}