diff options
Diffstat (limited to 'dmagick/Image.d')
| -rw-r--r-- | dmagick/Image.d | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d index ba36135..b7bf41e 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -771,7 +771,7 @@ class Image * Composites dest onto this image using the specified composite operator. * * Params: - * overlay = Image to use in to composite operation. + * overlay = Image to use in the composite operation. * compositeOp = The composite operation to use. * xOffset = The x-offset of the composited image, * measured from the upper-left corner @@ -2768,7 +2768,7 @@ class Image //Use the D GC to accolate the blob. GetMagickMemoryMethods(&oldMalloc, &oldRealloc, &oldFree); - SetMagickMemoryMethods(&GC.malloc, &GC.realloc, &GC.free); + SetMagickMemoryMethods(&Image.malloc, &Image.realloc, &Image.free); scope(exit) SetMagickMemoryMethods(oldMalloc, oldRealloc, oldFree); void* blob = ImageToBlob(options.imageInfo, imageRef, &length, DMagickExceptionInfo()); @@ -2776,6 +2776,24 @@ class Image return blob[0 .. length]; } + private extern(C) + { + static void* malloc(ulong sz) + { + return GC.malloc(sz, GC.BlkAttr.NO_SCAN); + } + + static void* realloc(void* p, ulong sz) + { + return GC.realloc(p, sz, GC.BlkAttr.NO_SCAN); + } + + static void free(void* p) + { + GC.free(p); + } + } + /** * Changes the opacity value of all the pixels that match color to * the value specified by opacity. By default the pixel must match |
