{"id":27014262,"url":"https://github.com/samdze/spriterot","last_synced_at":"2025-08-13T19:25:19.367Z","repository":{"id":180473172,"uuid":"598732389","full_name":"samdze/spriterot","owner":"samdze","description":"Command line utility to create spritesheets of rotated sprites.","archived":false,"fork":false,"pushed_at":"2023-03-28T12:58:40.000Z","size":21,"stargazers_count":32,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T13:35:51.970Z","etag":null,"topics":["command-line","command-line-tool","gamedev","nim","nim-lang","rotate-image","sprites","spritesheet"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/samdze.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":"2023-02-07T17:46:36.000Z","updated_at":"2025-04-01T17:16:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"27012352-bbf9-4d8f-ad73-85e6922f2786","html_url":"https://github.com/samdze/spriterot","commit_stats":null,"previous_names":["samdze/spriterot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samdze/spriterot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdze%2Fspriterot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdze%2Fspriterot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdze%2Fspriterot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdze%2Fspriterot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdze","download_url":"https://codeload.github.com/samdze/spriterot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdze%2Fspriterot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270297595,"owners_count":24560686,"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-08-13T02:00:09.904Z","response_time":66,"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":["command-line","command-line-tool","gamedev","nim","nim-lang","rotate-image","sprites","spritesheet"],"created_at":"2025-04-04T13:29:56.783Z","updated_at":"2025-08-13T19:25:19.349Z","avatar_url":"https://github.com/samdze.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/19392104/217358543-1a589bea-9cf0-4922-9b2b-aae28e617820.png\"\u003e\n\u003c/p\u003e\n\n# spriterot ![build workflow](https://github.com/samdze/spriterot/actions/workflows/build.yml/badge.svg)\nCommand line utility to create spritesheets of rotated sprites.\n\n## Features\n- By default, generates spritesheets wasting as little space as possible.\n- 4 rendering algorithms: RotSprite, shearing, nearest, linear.\n- Resizes the sprite to make the rotations non-transparent pixels fit just right.\n- Configurable (min, max, clamp, exact value) number of rows and columns in the generated spritesheet.\n- Configurable number of frames to generate and range of the rotation.\n- Overridable width and height for generated frames, or force keeping the same size.\n- Configurable margin around generated frames.\n- Verbose output to get info about the generated spritesheet.\n- Can resolve the number of rotations to generate from the image filename: e.g. image`-rotations-36`.png for 36 frames.\n\n## Usage\n```\nspriterot --help                                                        \nspriterot\n\nUsage:\n   [options] source\n\nArguments:\n  source           Image to generate the rotations of.\n\nOptions:\n  -h, --help\n  -v, --verbose              Show details about the image(s) being processed.\n  -k, --keep-size            Keep the size of the source image for generated rotations, could lead to cropped frames.\n  --columns=COLUMNS          Configure the number of columns the generated spritesheet should have. Could lead to wasted space or a cropped spritesheet. Possible values: [min:\u003cnumber\u003e, max:\u003cnumber\u003e, clamp:\u003cmin\u003e-\u003cmax\u003e, \u003cnumber\u003e]\n  --rows=ROWS                Configure the number of rows the generated spritesheet should have. Could lead to wasted space or a cropped spritesheet. Possible values: [min:\u003cnumber\u003e, max:\u003cnumber\u003e, clamp:\u003cmin\u003e-\u003cmax\u003e, \u003cnumber\u003e]\n  --width=WIDTH              Manual width of each generated frame. Could lead to wasted space or cropped frames.\n  --height=HEIGHT            Manual height of each generated frame. Could lead to wasted space or cropped frames.\n  -m, --margin=MARGIN        Margin around frames, in pixels. Inapplicable when --width or --height are manually set or when --keep-size is enabled. (default: 0)\n  -a, --algorithm=ALGORITHM  Algorithm used to rotate the image. Possible values: [rotsprite, shearing, nearest, linear] (default: rotsprite)\n  -r, --rotations=ROTATIONS  Amount of rotations to generate.\n  -f, --from=FROM            Angle in degrees from which to start generating rotations. (default: 0)\n  -t, --to=TO                Angle in degrees up to which to generate rotations. (default: 360)\n  -o, --output=OUTPUT        Output filename.\n```\n\n## Examples\n\nCreate a spritesheet containing 9 frames of `input_image.png`, from 0 to 90 degrees, with a margin of 1 pixel around each frame.\n```bash\nspriterot -r 9 -f 0 -t 90 -m 1 -o output_image_from_0_to_90.png input_image.png\n```\n\n\nCreate a spritesheet containing 20 frames of `input_image.png`, from 0 to 360 degrees, in a 2 columns grid. Verbose output.\n```bash\nspriterot -v --columns 2 -r 20 -o output_image_from_0_to_90.png input_image.png\n```\n\n\nCreate a spritesheet containing 36 frames of `input_image.png`, from 0 to 360 degrees, keeping the size of the original source image for generated frames (could lead to cropped frames).\n```bash\nspriterot -r 36 --keep-size -o output_image_from_0_to_90.png input_image.png\n```\n\n## Outputs\n\n`rotsprite`: best results for standard pixel art.\n\n![kirby-no-background-table-78-78-rotsprite](https://user-images.githubusercontent.com/19392104/217350096-ef44d493-9c46-4679-8261-d459a098d93d.png)\n\n`shearing`: best results for keeping shades of dither patterns, e.g. Playdate graphics with dithering.\n\n![kirby-no-background-table-78-78-shearing](https://user-images.githubusercontent.com/19392104/217350302-6e57b1df-99ea-4622-98a6-e6de48fbac5a.png)\n\n`nearest`: standard algorithm, nothing special.\n\n![kirby-no-background-table-78-78-nearest](https://user-images.githubusercontent.com/19392104/217350372-274bf2ec-2b1c-45c2-a91f-e67dfc884890.png)\n\n`linear`: best results for conventional graphics, not pixel art. \n\n![kirby-no-background-table-78-78](https://user-images.githubusercontent.com/19392104/217350403-22f86bd7-24a0-4af2-8d9b-9c14104f8d39.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdze%2Fspriterot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdze%2Fspriterot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdze%2Fspriterot/lists"}