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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mkoijn9

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

Post 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.                                            
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.).
Post Reply