3

Should my webapp be licensed as AGPL if it runs ImageMagick linked with GhostScript (which is AGPL)?

Here's a scenario:

  1. A user submits a PDF file.
  2. My webapp receives it and stores it on a HDD.
  3. The webapp runs ImageMagick convert to convert the first page to JPG.
  4. I send the JPG file back to the user.
3

ImageMagick isn't necessarily "linked" with GhostScript. It can use gs as a "delegate" (separate program) that converts to and from PostScript, PDF, and EPS. See "config/delegates.xml" in the ImageMagick distribution.

Within ImageMagick's "coders/ps.c", the actual interface looks like this:

ExecuteGhostscriptCommand(command,status);

It's the same deal with GraphicsMagick; see config/delegates.mgk in the GraphicsMagick distribution. In GM, the interface is

status=InvokePostscriptDelegate(image_info->verbose,command,exception);

ImageMagick itself claims to be under the Apache-2.0 license and GraphicsMagick itself claims to be under the MIT license.

Now IANAL and TINLA, but I believe that either of these allows you to license your webapp however you wish.

However, if your ImageMagick or GraphicsMagick was built with libgs, then it is definitely linked with Ghostscript, and doesn't use the "delegate" mechanism. Further muddying the waters is the fact that there are both GPL and AGPL plus commercially licensed releases of GhostScript that you (or a downstream user) might use.

Here is the position of Artifax, the owner of Ghostscript: Artifax licensing information, which includes this:

If your application (including its source code) is not licensed to the public under the AGPL, you are not authorized under the terms of the AGPL to ship AGPL Ghostscript or AGPL MuPDF with your application, or to allow your users to remotely interact with AGPL Ghostscript and AGPL MuPDF along with your application, if any one of the following is true:

your application contains a copy of some or all of AGPL Ghostscript or AGPL MuPDF;

your application is derived from, is based on, or constitutes a revision of some or all of AGPL Ghostscript or AGPL MuPDF;

your application includes one or more functions that use some or all of AGPL Ghostscript or AGPL MuPDF.

The first two cases are not true of ImageMagick or GraphicsMagick, but I'm not sure about the last one. You'll need to ask your lawyer.

I can't find anything in the Affero license itself that supports Artifex' position. In fact, it says

This License explicitly affirms your unlimited permission to run the unmodified Program

but if you run the unmodified program via another program such as ImageMagick, Artifex threatens to terminate your license.

The Affero license does say

Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.

but I don't think that paragraph comes into play here, because we are talking about running an unmodified copy of the Affero-licensed GhostScript program.

The question came up on the ImageMagick discourse server a few years ago and the response was "its incumbent upon the user to decide if they are complying with the licenses of the software they use."

  • 3
    FWIW the sad thing is that Artifax interpretation of the AGPL may be incorrect here and in any case kinda a source of FUD. – Philippe Ombredanne Nov 30 '16 at 6:48
  • @PhilippeOmbredanne Yes it looks as though Artifex is adding conditions to AGPL, outside of the license text itself (i.e., reneging on the deal). – Glenn Randers-Pehrson Nov 30 '16 at 14:18
  • 1
    I'm accepting this answer, since this is how I understand the AGPL license. I think it's Artifex, who are interpreting the license to broadly. They really wanted a license that prevented commercial use of GhostScript without paying them license fees while AGPL is about contributing changes back to the project. – piotrek Dec 1 '16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.