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.