summaryrefslogtreecommitdiff
path: root/dmagick
diff options
context:
space:
mode:
authorMike Wey2012-06-17 22:02:33 +0200
committerMike Wey2012-06-17 22:02:33 +0200
commit53ce20f4d870aec4319334e28bcd1ff51c6112f2 (patch)
treeeed2efc1808fad22d4219b00212129f1d3d76cea /dmagick
parentf0033740db783534fa1d36c20da8641f91cca5d9 (diff)
Call MagickCoreGenesis on Posix as a possible fix for issue #7.
Diffstat (limited to 'dmagick')
-rw-r--r--dmagick/Image.d16
1 files changed, 16 insertions, 0 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d
index d1e7205..66f41ef 100644
--- a/dmagick/Image.d
+++ b/dmagick/Image.d
@@ -4383,3 +4383,19 @@ class Image
assert( storage == StorageType.IntegerPixel );
}
}
+
+/*
+ * Initialize ImageMagick, causes an access violation on Windows.
+ */
+version (Posix)
+{
+ shared static this()
+ {
+ MagickCoreGenesis(toStringz(Runtime.args[0]) , false);
+ }
+
+ shared static ~this()
+ {
+ MagickCoreTerminus();
+ }
+}