Giter VIP home page Giter VIP logo

resvg's Introduction

Resvg

⚠️ WARNING: This is an experimental proof of concept. Read the code, use at your own risk ⚠️

Elixir library to render SVG into PNG using resvg.

Usage

# Get some SVG (read from file, generate in memory, etc.)
svg = File.read!("example.svg")

# Render into PNG
png = Resvg.render(svg, :png)

# Write to file (or serve via phoenix/plug)
File.write!("example.png", png)

Installation

If available in Hex, the package can be installed by adding resvg to your list of dependencies in mix.exs:

def deps do
  [
    {:resvg, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/resvg.

resvg's People

Contributors

teamon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rafaeliga

resvg's Issues

Version 0.3.2 missing precompiled NIFs

Hey,

It seems that the latest version of resvg published on hex didn't include the precompiled/checksums for all targets, only for x86_64-unknown-linux-gnu.

Best Regards,
Thiago Romano

Missing font text

Hello there @teamon!

Got this one working! Kind of...hahaha

The text is not showing when building on prod(docker, alpine):

image

It shows on my local(mac):

image

I see here that loads system fonts...maybe I need to install some kind of font or library on alpine?

I found this this on resvg, but Im not sure if its really related.

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.