2

I'm building an AIR application using Flex where I use the NativeProcess API to resize images through ImageMagick using the convert program. Does anyone know how I can package "convert" with my application without needing to install ImageMagick on the user's system?

I'm looking for a solution on Mac and PC. (especially on Mac).

I don't have that much experience with building/installing something like ImageMagick so I'm wondering if it can be done in one file (convert only) so that I can directly call it in my app without the user needing to install anything prior on his/her system.

Fréderic Cox
  • 321
  • 2
  • 7
  • 22

4 Answers4

1

You have to package your AIR application as native installer or with a captive runtime. Both methods allow you to add additional files to your package. Adding the convert executable won't be enough, though, because it depends on a number of ImageMagick shared libraries, loadable modules for different image formats, and possibly other files. To get started, you can add the whole ImageMagick directory to your package. You can find the path to the packaged convert executable using File.applicationDirectory.

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
0

I'm not an expert on Flex, but there is a documented method for packaging native extensions at Adobe. Won't this work?

Gene
  • 46,253
  • 4
  • 58
  • 96
0

I know this question is very old, but I have the same issue so I stumbled on it !

I actually found a Mac only workaround solution, that is to use sips instead of ImageMagick. Advantage being that sips is included in all Mac's (Well as far as I know, from 10.4 to 10.8).

In my case, all functionalities that I used ImageMagick for are also available in sips, so maybe it could fit you too !

Gabor
  • 394
  • 5
  • 12
0

I found someone who created static libs of convert and identify programs for Mac. For Windows these are available already on the ImageMagick website but for Mac you need to build these from source. Important on Mac is to not call Convert directly but use a bash script which sets the export paths first and then runs convert in order for it to work!

Fréderic Cox
  • 321
  • 2
  • 7
  • 22