{"id":21323824,"url":"https://github.com/richinfante/fbutils","last_synced_at":"2025-07-12T05:31:54.101Z","repository":{"id":56403000,"uuid":"210957904","full_name":"richinfante/fbutils","owner":"richinfante","description":"Short utility programs for taking control of the linux framebuffer when in console mode, to display images. This can be used for viewing images, creating lightweight dashboards, etc., without a window manager.","archived":false,"fork":false,"pushed_at":"2020-11-10T02:50:59.000Z","size":5212,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T07:34:57.889Z","etag":null,"topics":["framebuffer","graphics","linux-framebuffer"],"latest_commit_sha":null,"homepage":"","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/richinfante.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}},"created_at":"2019-09-25T23:21:03.000Z","updated_at":"2023-12-16T03:55:34.000Z","dependencies_parsed_at":"2022-08-15T18:01:01.165Z","dependency_job_id":null,"html_url":"https://github.com/richinfante/fbutils","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/richinfante%2Ffbutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richinfante%2Ffbutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richinfante%2Ffbutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richinfante%2Ffbutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richinfante","download_url":"https://codeload.github.com/richinfante/fbutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225798304,"owners_count":17525838,"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":["framebuffer","graphics","linux-framebuffer"],"created_at":"2024-11-21T20:27:27.273Z","updated_at":"2024-11-21T20:27:27.859Z","avatar_url":"https://github.com/richinfante.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Framebuffer Graphics\nWrite directly to the linux framebuffer. I use this from Raspbian Lite on multiple Raspberry Pi devices for displaying monitoring dashboards with pre-rendered graphs from AWS CloudWatch.\n\nNote: you may need/want to `usermod` your current user to add it into the `video` group like so, to avoid needing to use `sudo` to run each of these commands. The `ttymode` command still requires sudo, however:\n```bash\nsudo usermod -G video $(whoami)\n```\n\n## Dependencies\nInstall `libpng-dev` and `libjpeg-dev` if you are using the PNG or JPEG functions. `make` is required to build.\n```bash\nsudo apt-get install libpng-dev libjpeg-dev make\n```\n\n## Building\n```bash\nmake\n```\n\n## Usage\n- `fb-describe`\n  - outputs the device name, as well as dimensions. this can be used by drawing scripts to calculate sizes.\n  - example:\n  ```bash\n  $ fb-describe\n  /dev/fb0 1280 800\n  ```\n  \n- `fb-clear`\n  - clears the `/dev/fb0` framebuffer\n  - options:\n    - `-g` _(optional)_ - grayscale value from 0 (black) to 255 (white)\n      - example: `fb-clear -g 255`\n      \n- `fb-ttymode`\n  - sets the mode of the tty for graphics or text use\n  - example:\n  ```bash\n  $ fb-ttymode graphics # (this will cause text to not work, so run over ssh!)\n  $ fb-ttymode text\n  ```\n  \n- `fb-pngdraw` / `fb-jpgdraw` / `fb-svgdraw`\n  - draws an image to the framebuffer\n  - options:\n    - `-f` - path to the image file to draw.\n    - `-x` _(optional)_ default: 0 - the x position to draw\n    - `-y` _(optional)_ default: 0 - the y position to draw\n    - `-w` _(optional)_ default: display width - the width of the image\n    - `-h` _(optional)_ default: display height - the height of the image\n    - `-hue [mask]` _(optional)_ default: disabled - apply a hue-shift to the image, in the red, green, blue, cyan, yellow, magenta, or white hue. Valid characters in mask string are \"rgbcymw\".\n    - `-hue-threshold` _(optional)_ default: 20 - when applying a hue shift, pixels with RGB values abs. differences less than this are ignored.\n    - `-invert` _(optional)_ default: disabled - apply a `255 - x` transform to all pixels in the image, inverting it.\n    - `-grayscale` _(optional)_ default: disabled - shortcut for the options `-hue w -hue-threshold 0`\n  - example:\n  ```bash\n  $ fb-pngdraw -f foo.png -x 0 -y 0 -w 100 -h 100 -invert\n  $ fb-jpgdraw -f foo.jpg -x 0 -y 0 -w 100 -h 100 -hue r\n  ```\n\n## TODO\n- Add text rendering function with freetype\n- Add compositing which allows for multiple draw commands to be rendered to an offscreen buffer, and then rendered\n- Add alpha rendering ability\n\n## Licence\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichinfante%2Ffbutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichinfante%2Ffbutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichinfante%2Ffbutils/lists"}