{"id":23728098,"url":"https://github.com/reupen/svg-services","last_synced_at":"2026-01-31T12:18:53.123Z","repository":{"id":64573738,"uuid":"526738438","full_name":"reupen/svg-services","owner":"reupen","description":"foobar2000 component that provides an API for rendering SVGs","archived":false,"fork":false,"pushed_at":"2024-12-24T08:37:43.000Z","size":192,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-24T09:33:18.062Z","etag":null,"topics":["foobar2000"],"latest_commit_sha":null,"homepage":"https://yuo.be/svg-services","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reupen.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},"funding":{"github":["reupen"]}},"created_at":"2022-08-19T20:08:13.000Z","updated_at":"2024-12-24T08:37:46.000Z","dependencies_parsed_at":"2023-02-19T02:15:56.426Z","dependency_job_id":"26544ca3-8791-4ed9-97dc-45df333729b3","html_url":"https://github.com/reupen/svg-services","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reupen%2Fsvg-services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reupen%2Fsvg-services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reupen%2Fsvg-services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reupen%2Fsvg-services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reupen","download_url":"https://codeload.github.com/reupen/svg-services/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231933147,"owners_count":18448050,"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":["foobar2000"],"created_at":"2024-12-31T01:49:06.308Z","updated_at":"2026-01-31T12:18:53.064Z","avatar_url":"https://github.com/reupen.png","language":"C++","funding_links":["https://github.com/sponsors/reupen"],"categories":[],"sub_categories":[],"readme":"# SVG services\n\n[![Build status](https://github.com/reupen/svg-services/actions/workflows/build.yml/badge.svg)](https://github.com/reupen/svg-services/actions/workflows/build.yml?query=branch%3Amain)\n\nThis component provides an SVG renderer, for use by other foobar2000 components.\n\nThe [resvg library](https://github.com/RazrFalcon/resvg) is used to render SVGs.\n\n## API usage (for component developers)\n\nYou only need to include the [`api/api.h`](api/api.h) header to use the API. You\ncan copy it to your source tree, or you can add this repository as a Git\nsubmodule if you prefer.\n\nA simple usage example:\n\n```cpp\nabort_callback_dummy aborter;\nconst auto render_height = 512;\nconst auto render_width = 512;\nconst auto file_path = \"R(c:\\path\\to\\svg\\file)\";\n\nsvg_services::svg_services::ptr svg_api;\n\nif (!fb2k::std_api_try_get(svg_api)) {\n    // Handle the case when the API isn’t available\n}\n\nconst auto svg_data = filesystem::g_readWholeFile(file_path, 10'000'000, aborter);\n\nstd::vector\u003cuint8_t\u003e bitmap_data(\n    static_cast\u003csize_t\u003e(render_width) * static_cast\u003csize_t\u003e(render_height) * size_t{4});\nconst auto svg_document = svg_api-\u003eopen(svg_data-\u003edata(), svg_data-\u003esize());\n\nsvg_document-\u003erender(render_width, render_height, svg_services::Position::Centred, svg_services::ScalingMode::Fit,\n    svg_services::PixelFormat::BGRA, bitmap_data.data(), bitmap_data.size());\n\n// Pass data contained in bitmap_data to CreateDIBSection(), WIC etc.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freupen%2Fsvg-services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freupen%2Fsvg-services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freupen%2Fsvg-services/lists"}