{"id":16163807,"url":"https://github.com/sug0/cdhorizon","last_synced_at":"2026-01-11T01:30:22.265Z","repository":{"id":98037504,"uuid":"267382661","full_name":"sug0/cdhorizon","owner":"sug0","description":"Next-next-gen go-glitch. Accomplishes the performance goals horizon couldn't.","archived":false,"fork":false,"pushed_at":"2024-09-30T21:23:01.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T19:51:05.542Z","etag":null,"topics":["art","c","glitch","go-glitch","horizon","image","next-generation","trippy"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sug0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-05-27T17:23:06.000Z","updated_at":"2024-09-30T21:23:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"cedd9742-a1da-431e-987a-4f4e8d1a59c9","html_url":"https://github.com/sug0/cdhorizon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fcdhorizon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fcdhorizon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fcdhorizon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fcdhorizon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sug0","download_url":"https://codeload.github.com/sug0/cdhorizon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458002,"owners_count":20780677,"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":["art","c","glitch","go-glitch","horizon","image","next-generation","trippy"],"created_at":"2024-10-10T02:44:30.696Z","updated_at":"2026-01-11T01:30:22.186Z","avatar_url":"https://github.com/sug0.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcdhorizon\n\nC library used to glitch images with the help of [libgoimg](https://github.com/sug0/libgoimg)\nand [LuaJIT](https://bitop.luajit.org/).\n\n## Driver program\n\nA driver program is included to play around with the library.\nThe build script compiles both the library and the driver program.\nYou can obtain the driver program's usage (from the library's root path) with:\n\n    $ ./driver/cdhorizon\n\nThe possible output format strings are:\n\n* farbfeld\n* PNG\n* JPEG\n\n## Dependencies\n\n* libgoimg\n* LuaJIT\n* libjpeg (optional)\n* libpng (optional)\n\n## Building\n\nBuilding this project requires [tup](http://gittup.org/tup/).\nCompile the library with:\n\n    $ ./make build\n\nTo change the compilation flags, create a `tup.config` file with the\nfollowing content:\n\n    CONFIG_CC=...\n    CONFIG_CFLAGS=...\n    CONFIG_LDFLAGS=...\n\nIf you want libpng and/or libjpeg support on the driver program,\ncreating this file with the appropriate `CONFIG_LDFLAGS` is required.\nIf you're just building the library, you can ignore this step.\n\n## Lua API\n\n| Identifier         | Arguments         | Return   | Description                                                           |\n|--------------------|-------------------|----------|-----------------------------------------------------------------------|\n| `horizon.getpixel` | `x`, `y`          | `pixel`  | Returns a table with the RGB color components of the specified pixel. |\n| `horizon.setpixel` | `x`, `y`, `pixel` | N/A      | Takes an input table with the RGB components of the pixel to set.     |\n| `horizon.width`    | N/A               | `width`  | Constant value of the width of the input image.                       |\n| `horizon.height`   | N/A               | `height` | Constant value of the height of the input image.                      |\n| `horizon.params`   | N/A               | `params` | Returns a dynamic table with user defined script param values.        |\n\nSome examples can be found at `glitchers/`. The file `glitchers/id.lua` creates\nan exact replica of the input image, so it is a fine template for new scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsug0%2Fcdhorizon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsug0%2Fcdhorizon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsug0%2Fcdhorizon/lists"}