Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the latest version of Imagemagick on Heroku?

Heroku Cedar-14 stack currently runs a version of ImageMagick (6.7.7-10) that is nearly a year old:

Running `identify -version` attached to terminal... up, run.8227
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

I want to use the -canny option that performs edge detection in an image, but this was only introduced in a later version of ImageMagick.

The only available buildpack for ImageMagick on Heroku does not work on the Cedar-14 stack: https://github.com/mcollina/heroku-buildpack-imagemagick

Is there a way I can use ImageMagick v6.8.9-0 or later on Heroku?

Thanks in advance!

like image 616
Rob d'Apice Avatar asked Feb 10 '15 02:02

Rob d'Apice


People also ask

How do I upgrade my stack on Heroku?

To upgrade via the Heroku Dashboard, navigate to your app settings page and click the Upgrade Stack button. Confirm that you want to upgrade, which will set the stack to the latest version. The Upgrade Stack button is only shown if you have sufficient permissions to update the stack on the app.

What are the system requirements to run ImageMagick?

A minimum of 512 MB of RAM is recommended, but the more RAM the better. Although ImageMagick runs well on a single core computer, it automagically runs in parallel on multi-core systems reducing run times considerably. The Windows version of ImageMagick is self-installing.

How do I download and install ImageMagick?

Download HomeBrew and type: ImageMagick depends on Ghostscript fonts. To install them, type: The brew command downloads and installs ImageMagick with many of its delegate libraries (e.g. JPEG, PNG, Freetype, etc).

Can ImageMagick run on a multi-core computer?

Although ImageMagick runs fine on a single core computer, it automagically runs in parallel on multi-core systems reducing run times considerably. Complete portable application on Linux, no installation required.


2 Answers

// check image magick version
heroku run identify -version
heroku config:add IMAGE_MAGICK_VERSION="6.9.3-8"
// if you set buildpacks then your original buildpacks lost
heroku buildpacks:add --index 1 https://github.com/ello/heroku-buildpack-imagemagick.git
// commit
git push heroku master
heroku run identify -version
like image 141
V-SHY Avatar answered Oct 18 '22 05:10

V-SHY


Here is a potential option for using at least ImageMagick 6.8 on Heroku with the Cedar-14 stack: https://github.com/ello/heroku-buildpack-imagemagick-cedar-14

like image 39
Magne Avatar answered Oct 18 '22 05:10

Magne