{"id":26474191,"url":"https://github.com/mrizaln/qoipp","last_synced_at":"2025-10-19T10:02:38.073Z","repository":{"id":240111497,"uuid":"801277285","full_name":"mrizaln/qoipp","owner":"mrizaln","description":"A Quite OK Image (QOI) format codec written in C++20","archived":false,"fork":false,"pushed_at":"2024-05-18T08:57:33.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-18T19:59:44.405Z","etag":null,"topics":["cpp20","encoder-decoder","qoi-format"],"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/mrizaln.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":"2024-05-15T23:29:47.000Z","updated_at":"2024-05-29T22:22:54.736Z","dependencies_parsed_at":"2024-05-16T19:59:37.107Z","dependency_job_id":"9163110c-1984-4bd4-9bc6-fcc6e3c52aba","html_url":"https://github.com/mrizaln/qoipp","commit_stats":null,"previous_names":["mrizaln/qoipp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrizaln%2Fqoipp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrizaln%2Fqoipp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrizaln%2Fqoipp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrizaln%2Fqoipp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrizaln","download_url":"https://codeload.github.com/mrizaln/qoipp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244520022,"owners_count":20465624,"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":["cpp20","encoder-decoder","qoi-format"],"created_at":"2025-03-19T22:45:22.316Z","updated_at":"2025-10-19T10:02:38.068Z","avatar_url":"https://github.com/mrizaln.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qoipp\n\nA Quite OK Image ([QOI](https://qoiformat.org/)) format encoder/decoder written in C++20.\n\n## Dependencies\n\n- C++20\n\n## Usage\n\nYou can use CMake FetchContent to add this repo to your project.\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(\n    qoipp\n    GIT_REPOSITORY https://github.com/mrizaln/qoipp\n    GIT_TAG v0.5.0\n) # or use commit hash\nFetchContent_MakeAvailable(qoipp)\n\nadd_executable(main main.cpp)\ntarget_link_libraries(main PRIVATE qoipp)\n```\n\n\u003e No exception; all operation that can fail returns a `Result\u003cT\u003e`. On C++23 this is an `std::expected\u003cT, Error\u003e`.\n\n```cpp\n#include \u003cqoipp.hpp\u003e\n\nint main()\n{\n    {    // read directly from file\n        auto image = qoipp::decode_from_file(\"./path/to/file.qoi\");\n        if (not image) {\n            std::cout \u003c\u003c to_string(image.error()) \u003c\u003c '\\n';    // using ADL\n            return 1;\n        }\n\n        // image-\u003edata     is the raw image bytes decoded from the file\n        // image-\u003edesc     is the image description (width/height/channels/colorspace)\n\n        // do something with the image data...\n    }\n\n    {    // decode data already in memory\n        auto data = /* qoi image bytes read from file for example */;\n\n        auto image = qoipp::decode(data);\n        if (not image) {\n            std::cout \u003c\u003c to_string(image.error()) \u003c\u003c '\\n';    // using ADL\n            return 1;\n        }\n\n        // do something with the image data...\n    }\n\n    {    // there's also an overload that can take a buffer as an out parameter\n        auto data = /* qoi image bytes read from file for example */;\n\n        auto buffer = Vec(/* width * height * channels */);\n        auto desc   = qoipp::decode_into(buffer, data);\n        if (not desc) {\n            std::cout \u003c\u003c to_string(desc.error()) \u003c\u003c '\\n';    // using ADL\n            return 1;\n        }\n\n        // do something with the data in the buffer...\n    }\n\n    // those above are all decode* functions, the opposite encode* functions are also present\n}\n```\n\n\u003e See [example](./example) for more usage or read the [header](./include/qoipp.hpp) directly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrizaln%2Fqoipp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrizaln%2Fqoipp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrizaln%2Fqoipp/lists"}