Giter Club home page Giter Club logo

Comments (11)

mcollina avatar mcollina commented on September 24, 2024

The easy thing I can do it's to bundle libpng (#1), then you can fork this repo and add librsvg and its dependencies.
You will need an AWS account for doing that, as it requires some uploading/downloading from there.

from heroku-buildpack-imagemagick.

mcollina avatar mcollina commented on September 24, 2024

I added support for libpng, it should be clear reading the two files:

  • support/build_imagemagick
  • bin/compile

How to add another library.

Let me know if you face any problems.

from heroku-buildpack-imagemagick.

novito avatar novito commented on September 24, 2024

@mcollina Thanks for this buildpack. I am also looking for a way to include librsvg. It would be really helpful if you could explain the steps in order to add a new library, or specifically how to add librsvg. Is not that you need to add the dependencies, but also that imagemagick needs to be installed with the +rsvg option.

from heroku-buildpack-imagemagick.

mcollina avatar mcollina commented on September 24, 2024

Here is the problem: the tool used to create this buildpack have been deprecated and it is now unmaintained (vulcan). Plus, I have no real bandwidth for this, as I switched job.

Maybe @paolochiodi can help.

from heroku-buildpack-imagemagick.

novito avatar novito commented on September 24, 2024

@mcollina Thanks for the quick reply. I will see if @paolochiodi has any recommendations.

from heroku-buildpack-imagemagick.

paolochiodi avatar paolochiodi commented on September 24, 2024

@novito modifying the buildpack shouldn't be hard.
This buildpack is made of two parts: the actual buildpack (the bin folder) and the support scripts (you guess, the support folder).
I'd consider the support folder deprecated and leave it as is: it contains the script to build imagemagick and dependencies with the now deprecated vulcan system provided by heroku.
The scripts in the bin folder follow the build pack api requirements, and are only responsible for downloading the imagemagick and libpng binaries from an s3 bucket.
In order to have imagemagick compiled with librsvg you should:

  • compile and build libpng, libsrvg and imagemagick in a way that are compatible with the heroku environment, which means cross-compiling (last time I checked heroku dynos where custom installs of and old ubuntu) or compiling directly on a dyno (you can access an heroku dyno with heroku run bash). I'd suggest the latter method, but you need to be confident with curl to download the packages sources and upload the binaries to amazon s3 or somewhere you can reach them)
  • upload the binaries to an s3 bucket (or ask @mcollina to upload them on his bucket)
  • fork this repo
  • change https://github.com/mcollina/heroku-buildpack-imagemagick/blob/master/configs.sh on your repo to match new versions and bucket. Also add path for librsvg
  • change https://github.com/mcollina/heroku-buildpack-imagemagick/blob/master/bin/compile to download the compiled librsvg. You can copy the part that downloads libpng.
  • test the new buildpack on a secondary app

I'd like to help with the all the procedure, but I'll be on annual leave from wednesday and I'l be back on September, 1st and I don't know if I'll be able to complete everything before wednesday.

from heroku-buildpack-imagemagick.

mcollina avatar mcollina commented on September 24, 2024

BTW, the moment you do this, you want to tackle also #7.

I've added @paolochiodi as a collaborator.

from heroku-buildpack-imagemagick.

paolochiodi avatar paolochiodi commented on September 24, 2024

@novito Do you have experience building librsvg from scratch? I've spent some time building it (and its dependencies) from scratch on heroku and trying to get a cross-compiled and statically linked imagemagick version, but failed at both.
If you can give me some guidance in building librsvg I would then be able to integrate it in the buildpack

from heroku-buildpack-imagemagick.

novito avatar novito commented on September 24, 2024

@mcollina @paolochiodi sorry for the late reply.

I spent a lot of time trying to create my own buildpack in order to support libsrvg on Heroku. It was a PAIN and I didn't get anywhere. A lot of dependencies were not compiling properly on the platform, so I give up.

Fortunately, the Cedar 14 comes with a newer version of Imagemagick with proper SVG support. So I finally chose that approach.

@paolochiodi unfortunately I don't have experience building librsvg from scratch, and I spent over a day with a friend of mine who works as a syadmin, trying to build the buildpack for a Heroku environment, and no luck.

Thanks for the time you guys spent on this.

from heroku-buildpack-imagemagick.

paolochiodi avatar paolochiodi commented on September 24, 2024

@novito I'm somehow "relieved" that someone else found it hard, like I did. The dependencies list for librsvg seem quite long and not well documented.

Cedar 14 is indeed a good news: I always prefer using default configurations and base packages provided directly by heroku

from heroku-buildpack-imagemagick.

mcollina avatar mcollina commented on September 24, 2024

Yep, I was told this Cedar 14 thing a couple of weeks ago :).

@paolochiodi can you still run some benches on it? It might seems that our graphicsmagick buildpack can still outbeat the stock version, or maybe not.

from heroku-buildpack-imagemagick.

Related Issues (12)

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.