Page 1 of 1

What dll's do I need to distribute with my application?

Posted: 2010-10-11T04:26:52-07:00
by mkoijn9
Hi, I'm using the magickwand interface to build animated gifs from png files.

If I give my application to others who don't have imagemagick installed on their computer, what dll's do I need to distribute with my application?

I use the following magickwand commands:
MagickWandGenesis;
MagickReadImage
MagickSetImageDelay;
MagickAddImage;
MagickWriteImages
MagickWandTerminus
DestroyMagickWand

If anyone is interested, here's an easy example in Pascal how I programmatically build an animated gif from two png files:

Code: Select all

program wanddemo;

{$mode objfpc}{$H+}

uses SysUtils, magick_wand, ImageMagick;

procedure ThrowWandException(wand: PMagickWand);
var
  description: PChar;
  severity: ExceptionType;
begin
  description := MagickGetException(wand, @severity);
  WriteLn(Format('An error ocurred. Description: %s', [description]));
  description := MagickRelinquishMemory(description);
  Abort;
end;

var
  status: MagickBooleanType;
  wand: PMagickWand;
  wand1: PMagickWand;
  wand2: PMagickWand;
begin
  { Read an image. }

  MagickWandGenesis;
  wand := NewMagickWand;
  wand1 := NewMagickWand;
  wand2 := NewMagickWand;
  try
    status := MagickReadImage(wand1, 'image.png');
    if (status = MagickFalse) then ThrowWandException(wand1);

    status := MagickReadImage(wand2, 'image2.png');
    if (status = MagickFalse) then ThrowWandException(wand2);


    //MagickResetIterator(wand);

   MagickSetImageDelay(wand1,25);
      MagickAddImage(wand,wand1);

   MagickSetImageDelay(wand2,25);
      MagickAddImage(wand,wand2);


    status := MagickWriteImages(wand, 'image.gif', MagickTrue);
    if (status = MagickFalse) then ThrowWandException(wand);

  finally
    wand := DestroyMagickWand(wand);
    wand1 := DestroyMagickWand(wand1);
    wand2 := DestroyMagickWand(wand2);
    MagickWandTerminus;
  end;
end.                                            

Re: What dll's do I need to distribute with my application?

Posted: 2010-10-11T06:51:32-07:00
by magick
Try the portable Windows distribution of ImageMagick @ http://www.imagemagick.org/download/bin ... indows.zip. You can then remove any component you don't require such as all the command line utilities (e.g. convert, identify, etc.).