{"id":13659268,"url":"https://github.com/revisitors/glitcher","last_synced_at":"2025-04-24T14:33:04.823Z","repository":{"id":19977525,"uuid":"23244614","full_name":"revisitors/glitcher","owner":"revisitors","description":"A tool for glitching images","archived":false,"fork":false,"pushed_at":"2015-12-09T00:18:14.000Z","size":2562,"stargazers_count":70,"open_issues_count":0,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-18T07:16:45.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/revisitors.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}},"created_at":"2014-08-23T01:10:40.000Z","updated_at":"2024-08-26T10:22:36.000Z","dependencies_parsed_at":"2022-08-27T04:00:17.277Z","dependency_job_id":null,"html_url":"https://github.com/revisitors/glitcher","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revisitors%2Fglitcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revisitors%2Fglitcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revisitors%2Fglitcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revisitors%2Fglitcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revisitors","download_url":"https://codeload.github.com/revisitors/glitcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643657,"owners_count":21464217,"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":[],"created_at":"2024-08-02T05:01:06.903Z","updated_at":"2025-04-24T14:33:04.517Z","avatar_url":"https://github.com/revisitors.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"glitcher\n=====\n\n[![NPM](https://nodei.co/npm/glitcher.png)](https://nodei.co/npm/glitcher/)\n\nAn image glitching toolbox.\n\nRunning Examples\n================\n\nTo see demo output of API functions, clone this repository and then use `node` to run any of the files in the `examples/` folder.\n\nFor example, to run `flip.js`, change directories into the `examples/` folder, and then run `node flip.js`.\n\nExample files pull source images from the `img/` folder and then save their glitch transformations to the `output/` folder.\n\nAPI\n===\n\n`invertRGBA(buffer)`\n---\n\nInverts an RGBA buffer.\n\n`reverseRGBA(buffer)`\n---\n\nFlips (vertically) a RGBA buffer by reversing the pixels.\n\n`redBlueOverlay(buffer)`\n---\n\nOverlays red/blue channels from the first half of an RGBA buffer over the second half of an RGBA buffer.\n\n`clampColors(buffer[, maxColors])`\n---\n\nA slightly glitchy color clamp to `maxColors` (default 256).\n\n`glitchClamp(buffer[, maxColors])`\n---\n\nA randomizing color clamper. Randomizes a palette limited to `maxColors` (default 256).\n\n`ghostColors(buffer[, maxColors])`\n---\n\nA ghosting color palette -- the first `maxColors` (default 256) are processed, any colors outside the first set are assigned the same hue.\n\n`glitchGhost(buffer[, maxColors])`\n---\n\nA ghosting color palette -- the first `maxColors` (default 256) are processed, any other colors are assigned a hue from a randomly generated palette of `maxColors` hues.\n\n`grayscale(buffer)`\n---\n\nConvert a RGBA buffer to grayscale.\n\n`var shifted = pixelshift(buffer, pixels)`\n---\n\nShift an image in the x direction by `pixels`\n\n`rowslice(buffer, bandsize)`\n---\n\nSlice an image into rows of `bandsize` -- this is a raw value. Choose numbers somewhere on the order of the image height * width for best results. A small value will generally turn your image into noise.\n\n`cloneChannel(sourceBuffer, targetBuffer, channel)`\n---\n\nCopy all pixels from channel `channel` (0-3) from source to target. Works best if the images are the same dimensions.\n\n`smear(buffer, smearwidth)`\n---\n\nSmear pixels by `smearwidth` to the right\n\n`smearChannel(buffer, channel, smearwidth)`\n---\n\nSmear `channel` for `smearwidth` pixels at a ttime.\n\nLICENSE\n=======\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevisitors%2Fglitcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevisitors%2Fglitcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevisitors%2Fglitcher/lists"}