Last update Sun May 11 01:02:36 2014


A collection of helper functions used in DMagick.

zlib (See accompanying LICENSE file)

Mike Wey

void copyString(ref char[MaxTextExtent] dest, string source);

Copy a string into a static array used by ImageMagick for some atributes.

void copyString(ref char* dest, string source);

Our implementation of ImageMagick's CloneString.

We use this since using CloneString forces us to append a \0 to the end of the string, and the realocation whould be wastefull if we are just going to copy it

used for copying a string into a Imagemagick struct

real degreesToRadians(real deg);

struct RefCounted(alias pred, T) if (!is(T == class) && is(typeof(pred(cast(T*)null)) == T*));

A template struct to make pointers to ImageMagick structs reference counted. Excepts a predicate pred which destroys the struct pointer when refCount is 0.