{"id":40055745,"url":"https://github.com/aexoden/snesimage","last_synced_at":"2026-01-19T06:34:51.339Z","repository":{"id":137628062,"uuid":"296517165","full_name":"aexoden/snesimage","owner":"aexoden","description":"A tool to optimize images for use on the SNES.","archived":false,"fork":false,"pushed_at":"2025-10-22T20:53:50.000Z","size":329,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-22T22:23:33.877Z","etag":null,"topics":["image-processing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aexoden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-18T04:53:59.000Z","updated_at":"2025-10-22T20:53:54.000Z","dependencies_parsed_at":"2026-01-07T05:03:55.188Z","dependency_job_id":null,"html_url":"https://github.com/aexoden/snesimage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aexoden/snesimage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexoden%2Fsnesimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexoden%2Fsnesimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexoden%2Fsnesimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexoden%2Fsnesimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aexoden","download_url":"https://codeload.github.com/aexoden/snesimage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexoden%2Fsnesimage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"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":["image-processing"],"created_at":"2026-01-19T06:34:51.281Z","updated_at":"2026-01-19T06:34:51.327Z","avatar_url":"https://github.com/aexoden.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"snesimage\n=========\n\nsnesimage is a utility for optimizing a given image for display on the SNES. It\ncurrently uses a combination of a k-means clustering algorithm to determine the\ninitial palette, with a iterative optimization algorithm to improve the\ngenerated palette.\n\nUsage\n-----\n\nsnesimage currently expects to be given a 256x256 source image. Other sizes will\nlikely do very strange things, if they work at all.\n\nThe following command-line options are available:\n\n* `--subpalette-count` determines the number of subpalettes to use.\n* `--subpalette-size` determines the size of each subpalette, not including the\n  transparent color. As a result, values of 3, 7 and 15 are most likely to be\n  useful.\n* `--dither` enables dithering of the result.\n* `--perceptual-palettes` does color comparisons in CIELAB space instead of RGB.\n  This does cache computations and may use up to several gigabytes of RAM, so\n  monitoring memory usage is recommended if this option is enabled. However, the\n  final result will possibly be better. The error function, however, is based on\n  SSIMULACRA2 and will do its own calculations regardless of this option. This option\n  controls initial palette assignment and the choice of which palette entry to\n  use for each pixel.\n* `--nes` restricts the available colors to those available on the NES (assuming\n  no color de-emphasis bits or mid-frame trickery). Note that the generated output\n  is still intended for the SNES. The primary purpose is to generate SNES images\n  that look like they could have been for the NES, for whatever reason. As an\n  additional limtation, the system still assumes palettes can be set per 8x8 tile,\n  which is only true on the NES when using certain less common mappers. (To maximize\n  the effect, you would want to use 1-4 subpalettes with 3 colors each.)\n\nThe program takes two mandatory arguments: an image to optimize, and the\nfilename you wish any JSON output to be written to.\n\nAfter starting the program, it will begin in tile assignment mode, assigning\neach tile to a palette index. The default assignment is often fine, but if you\nwish to tweak it, you may do so by clicking on the tile in question to switch it\nto the next available palette. (The colors of the tiles reflect the average\ncolor of the originally chosen tiles using that palette.)\n\nOnce the tiles are set to your satisfaction, click the green button to assign\nthe initial palettes. Depending on your image, this assignment may be completely\nsatisfactory. If so, you may press the blue button to immediately write the\ncurrent state to the output file. Otherwise, press the green button again to\nbegin the optimization phase.\n\nThe optimization phase will run indefinitely, though it will generally stop\nimproving the result within a few minutes. At any point, you can press the\nblue button to output the current state.\n\nOutput Format\n-------------\n\nThe output format is currently a rather simple JSON document, with three\nseparate arrays. The first, named `tiles`, is an array of arrays, each of which\ncontains the palette number (within each subpalette, therefore ranging from 0 to\n15) used by that pixel of the tile. The `palette` section gives the full palette\nentries, automatically expanding each subpalette to the full 16 colors\n(including the transparent color at index zero). The entries are already\nconverted to the SNES palette format and are given as 16-bit unsigned integers.\nThe final section, `tile_palettes`, provides the palette index used by each\ntile, numbered starting from zero.\n\nNotes\n------------\n\nAny fully transparent pixel in the original image will remain transparent in the\nfinal output. Partially transparent pixels will have their transparency silently\nignored.\n\nNo attempt is made to consolidate identical tiles, and each of the original\ntiles is output in its entirety.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faexoden%2Fsnesimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faexoden%2Fsnesimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faexoden%2Fsnesimage/lists"}