{"id":20586115,"url":"https://github.com/mrdotb/resvg_nif","last_synced_at":"2025-04-09T13:10:00.842Z","repository":{"id":175277327,"uuid":"653184781","full_name":"mrdotb/resvg_nif","owner":"mrdotb","description":":pencil2: Elixir NIF bindings for the Resvg library.","archived":false,"fork":false,"pushed_at":"2025-03-12T09:48:59.000Z","size":1038,"stargazers_count":27,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T06:03:25.118Z","etag":null,"topics":["elixir","png","rustler","svg"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/resvg/readme.html","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrdotb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-06-13T15:00:02.000Z","updated_at":"2025-03-12T09:47:42.000Z","dependencies_parsed_at":"2024-03-22T07:41:09.741Z","dependency_job_id":"ece3a43f-9e6e-4372-872e-f3699b59f712","html_url":"https://github.com/mrdotb/resvg_nif","commit_stats":null,"previous_names":["mrdotb/resvg_nif"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotb%2Fresvg_nif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotb%2Fresvg_nif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotb%2Fresvg_nif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdotb%2Fresvg_nif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdotb","download_url":"https://codeload.github.com/mrdotb/resvg_nif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045245,"owners_count":21038554,"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":["elixir","png","rustler","svg"],"created_at":"2024-11-16T07:10:16.407Z","updated_at":"2025-04-09T13:10:00.823Z","avatar_url":"https://github.com/mrdotb.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resvg (Rust NIFs for elixir)\n\n[![Build Status](https://github.com/mrdotb/resvg_nif/workflows/Tests/badge.svg)](https://github.com/mrdotb/resvg_nif/workflows/Tests/badge.svg)\n[![Module Version](https://img.shields.io/hexpm/v/resvg.svg)](https://hex.pm/packages/resvg)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/resvg)\n[![Total Download](https://img.shields.io/hexpm/dt/resvg.svg)](https://hex.pm/packages/resvg)\n[![License](https://img.shields.io/hexpm/l/resvg.svg)](https://github.com/mrdotb/resvg_nif/blob/master/LICENSE.md)\n\nNative Implemented Function (NIF) bindings for the [resvg](https://github.com/RazrFalcon/resvg) library.\n\nAbout resvg from its documentation:\n\u003e resvg is an SVG rendering library. The core idea is to make a fast, small, portable SVG library with the goal to support the whole SVG spec.\n\n## Installation\n\nThe package can be installed\nby adding `resvg_nif` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:resvg, \"~\u003e 0.5.0\"}\n  ]\nend\n```\n\n## Usage\n\nConvert svg to png with:\n\n```elixir\n:ok = Resvg.svg_to_png(\"input.svg\", \"output.png\")\n\nsvg_string = \"\"\"\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"\u003e\n  \u003cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.758-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z\" /\u003e\n\u003c/svg\u003e\n\"\"\"\n:ok = Resvg.svg_string_to_png(svg_string, \"output.png\", resources_dir: \"/tmp\")\n```\n\n## Livebook introduction\n\nEasiest way to get started and try more advanced example is is to run the Livebook.\n\n[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fmrdotb%2Fresvg_nif%2Fblob%2Fmaster%2Flivebooks%2Fexample.livemd)\n\n## Contributing\n\nYou can contribute to resvg_nif. Please check the [CONTRIBUTING.md](CONTRIBUTING.md) guide for more information.\n\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to our [CODE_OF_CONDUCT.md](/CODE_OF_CONDUCT.md).\n\n### How to release a new version to hex\n\n1. Update the version in both `mix.exs` and `README.md`.\n2. Tag the commit with the version number, for example: `git tag v0.4.0 commit_hash`.\n3. Push the commit and the tag using: `git push origin master \u0026\u0026 git push --tags`.\n4. Wait for the CI to generate all the NIFs.\n5. Generate the NIF checksum with: `mix rustler_precompiled.download Resvg.Native --all`.\n6. Verify that the generated checksum is correct.\n7. Publish the package with: `mix hex.publish`.\n\nLet me know if you'd like to adjust anything further!\n## Copyright and License\n\nCopyright (c) 2023 Mrdotb\n\nThis work is free. You can redistribute it and / or modify it under the terms of the MIT License. See the LICENSE.md file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdotb%2Fresvg_nif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdotb%2Fresvg_nif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdotb%2Fresvg_nif/lists"}