Use Windows GM without installing?

  • Geo Anderson
    Geo Anderson

    I have a photo processing application that is presently using ImageMagick.  The reportedly faster speed of GM is attractive and I would like to try to switch.

    The application is distributed together with its supporting tools, like ImageMagick.  Actually I only use convert.exe and I simply include it in the zip file I distribute.  The program doesn't require any installation on the user machine.  In fact it is designed to be run from a USB flash drive.

    So … the question is: Can GM be used this way or does it actually have to be officially installed on the user's machine.  For me, that is a deal killer, unfortunately.


  • The "setup.exe" style DLL installers that I build do require running an installation program.  If you are willing to rebuild the software from source code, there is a way to build is so that it can run in place as you describe.  You would want to build a static gm.exe and use the default "uninstalled" configuration.  Even if you build a DLL-based package, it can be run with the "uninstalled" configuration with any needed DLLs and config files residing alongside gm.exe.  I considered making that the default for this release but it was not safe to do so without considerable test time.

  • Geo Anderson
    Geo Anderson

    Thanks for the quick response.  Unfortunately, I'm not in a position to deal with the source code, nor would I want to put myself in a position having to repeat the work to chase subsequent releases.

    I have no idea what "the market" might want re a stand-alone GM, but from my parochial viewpoint I would sure encourage you to offer an uninstalled option.  An exe and, if necessary, a few co-located DLLs would be perfect.  I am now using just convert.exe from the IM suite and it is working fine.  I am also successfully using EXIFTool and 7-Zip in that mode.

  • I will see what I can do in that regard.  I think that things are pretty close to where they need to be.  It is just a matter of some build options.

  • The latest GraphicsMagick snapshot (from is now built as you describe.  While the installer does update the registry, the installed GM does not use the registry to find itself.  This means that you can extract files from the install footprint and they should be able to work in a side-by-side configuration without being formally "installed".  Please let me know if this works for you.

  • Geo Anderson
    Geo Anderson

    Thanks very much.  It seems to work just fine.  I did a Windows install, then copied everything from the resulting GM folder to a folder on D:\  I then uninstalled GM and was able to successfully view a jpg with gmdisplay.exe.

    Following that, I copied gm.exe to a folder associated with my application and repeatedly tried to run it until I had (I think) smoked out all the dependencies and copied the other required files.  After that, I was able to call it from within the application to rotate some jpgs.  Worked fine and was around twice as fast as IM.  I also have some sizing steps, so I'll play with that next.

    Again, thanks!

  • Some often-required dependencies may seem a bit odd.  For example the "logo" coder is the one which produces the GM frog image as well as various patterns and the "XC" coder is used to produce images of solid color.  It is always good to include log.mgk so that you have opportunity to see what is going on inside the software if something goes wrong.

  • Geo Anderson
    Geo Anderson

    Sorry to say, no good deed goes unpunished.  Now I have a support question.  :-(

    I am having a problem with the following (crlfs added for clarity):

    "D:\GraphicsMagick\gm.exe" convert
    -gravity south
    -background black
    -splice 0x1
    -background white
    -splice 0x114
    -gravity Southwest
    -fill black
    -pointsize 12
    -draw "text +82+12 'CAP Mission # 11-T-9999 Sortie # A002'"
    -draw "text +82+28 'TOT (from GPS): 20-Oct-09 14:47:17Z'"
    -draw "text +82+44 'Target Lat: N0°  00.00\'     Long: W0°  00.00\''"
    -draw "text +82+60 'Camera Lat: N39°  08.37\'     Long: W94°  30.91\''"
    -draw "text +82+76 'Location: y, MN'"
    -draw "text +82+92 'Object: x'"

    I am getting the the error message: "Unrecognized option <-splice>"

    I am running gm.exe from a directory that is a full copy of the windows install directory, including all dlls and subdirectories.

    I have searched the forums, bug list, feature requests, FAQs, etc. and do not find "splice" mentioned.


  • GraphicsMagick does not support -splice.  GM is not a clone of current ImageMagick.  It is an independent development starting with ImageMagick as it existed in November of 2002.  Sometimes we do implement new options based on options that people find particularly valuable from recent ImageMagick.

    What exactly are you trying to accomplish in your overall result?  Might it also be accomplished by compositing the image on a an image of solid background color or appending a solid color image of appropriate width to the bottom?  I see that -splice offers the convenience of not needing to know the image size.

  • Geo Anderson
    Geo Anderson

    Got it.  RTFM.

    Yes, -splice is quite nice for what I am doing, which is to add a 1 pixel black line, then a white "data strip" at the bottom of a jpg.  All of the text is then drawn onto the data strip.

    I may try some workarounds, but my guess is that if I have to start creating and appending images to accomplish the splice then GM's speed advantage will be diminished or eliminated.   I do have GM doing image scaling and rotation and definitely see a performance improvement over IM, so I am not unhappy with the GM experiment..

    Thanks for your help on this.

  • The -splice functionality is certainly useful.  I will put it on my "TODO" list.

    Some of this sort of functionality can be coaxed out of the 'montage' command.


  • Geo Anderson
    Geo Anderson

    Thanks yet again.  I clicked the "Monitor" button on SourceForge and will be watching for this.  I'll also take a look at montage.