{"id":21945093,"url":"https://github.com/edwardoid/libfb","last_synced_at":"2026-05-06T20:39:27.957Z","repository":{"id":146714820,"uuid":"186431106","full_name":"edwardoid/libfb","owner":"edwardoid","description":"Simple library to render on linux framebuffer","archived":false,"fork":false,"pushed_at":"2021-07-09T12:05:09.000Z","size":959,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T17:48:00.719Z","etag":null,"topics":["framebuffer","internet-of-things","iot","linux","orangepi","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edwardoid.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}},"created_at":"2019-05-13T14:00:59.000Z","updated_at":"2021-07-09T12:05:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa670c46-5c6d-468c-b83f-baebb8fd15c4","html_url":"https://github.com/edwardoid/libfb","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/edwardoid%2Flibfb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardoid%2Flibfb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardoid%2Flibfb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwardoid%2Flibfb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edwardoid","download_url":"https://codeload.github.com/edwardoid/libfb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244982060,"owners_count":20542301,"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","internet-of-things","iot","linux","orangepi","raspberry-pi"],"created_at":"2024-11-29T04:17:45.131Z","updated_at":"2026-05-06T20:39:22.922Z","avatar_url":"https://github.com/edwardoid.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libfb\n**libfb** is a simple library to draw on linux framebuffer.\nFollowing functionality is implemented\n  - Draw single pixels\n  - Draw png images (libpng)\n  - Draw QR codes (libqrencode)\n  - Draw text (libfreetype2)\n  - Fill/clear\n\n  Color interface is RGB888\n# Important\nThis library is designed to be used without X11.\n# Test environment\n  - Orange PI Zero (any other device like Rapsberry PI should work as well)\n  - 160*128 LCD SPI Display based on ST7735 16bit-depth color (should work on any other display)\n  - Armbian Linux (shoudl work on any linux distro, no specific libs were used)\n# Installation\n\nClose the repo:\n```sh\ngit clone https://github.com/edwardoid/libfb.git\ncd libfb\nmkdir tests\ncd tests\ncmake $PWD/..\nmake\nmake install\n```\nNow you can link fo libfb ```libfb.a``` and ```libfb.so```\nTo build examples:\n```sh\ncmake $PWD/.. -DBUILD_TEST=YES\nmake\n```\n\n# Example\n```c++\n\n// File: main.cpp\n\n#include \u003cthread\u003e\n#include \u003cchrono\u003e\n#include \"framebuffer.h\"\n#include \"pngprovider.h\"\n#include \"pngimage.h\"\n#include \"sprite.h\"\n#include \"log.h\"\n\nint main()\n{\n    IoT::FrameBuffer fb(\"/dev/fb0\");\n    IoT::PNGProvider provider;\n\n    fb.open();\n    fb.clear(0xFFFFFF);\n    bg = provider.get(\"./bg_blue.png\");\n    auto sourceImg = provider.get(\"./normal_sprite.png\");\n    auto sp = std::make_shared\u003cIoT::Sprite\u003e(std::dynamic_pointer_cast\u003cIoT::Pixmap\u003e(sourceImpl),\n                                            /* frame width: */ 160,\n                                            /* frame height */ 128,\n                                            /* frmaes count */ 166);\n    while(1) {\n        sp-\u003ejump(i % sp-\u003eframesCount());\n        ++i;\n        fb.flush();\n        std::this_thread::sleep_for(std::chrono::milliseconds(20));\n    }\n    return 0;\n}\n```\n\nCompile with\n```sh\ng++ main.cpp -I\u003cinclude dir path\u003e -L\u003clibraries directory\u003e -lfb -lqrencode -lfreetype -I/usr/include/freetype2 -o testApp\n```\nRun:\n```1sh\n./testApp\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardoid%2Flibfb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedwardoid%2Flibfb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardoid%2Flibfb/lists"}