diff options
| author | Mike Wey | 2011-07-10 17:15:42 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-07-10 17:15:42 +0200 |
| commit | bedb90d2ed2f40531ec8e10b5bbf2f7ddff045f3 (patch) | |
| tree | fb7fb725977b64cdcae10551bfb00fb4b19a5fba /dmagick/Image.d | |
| parent | 06816cac1ddb330e19e2bbe884d249526212ccba (diff) | |
Update headers to version 6.7.1ImageMagick_6.7.1
Diffstat (limited to 'dmagick/Image.d')
| -rw-r--r-- | dmagick/Image.d | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d index ba9b915..09572e7 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -1637,6 +1637,31 @@ class Image } /** + * Replaces the pixels in the specified area with pixel data + * from the supplied array. + * + * Params: + * area = Location in the image to store the pixels. + * pixels = An array of pixels defined by map. + * map = This character string can be any combination + * or order of R = red, G = green, B = blue, A = + * alpha, C = cyan, Y = yellow, M = magenta, and K = black. + * The ordering reflects the order of the pixels in + * the supplied pixel array. + */ + void importPixels(T)(Geometry area, T[] pixels, string map = "RGBA") + { + StorageType storage = getStorageType!(T); + + ImportImagePixels(imageRef, + area.xOffset, area.yOffset, + area.width, area.height, + toStringz(map), storage, pixels.ptr); + + DMagickException.throwException(&(imageRef.exception)); + } + + /** * Adjusts the levels of an image by scaling the colors falling between * specified white and black points to the full available quantum range. * The parameters provided represent the black, mid, and white points. @@ -1921,31 +1946,6 @@ class Image } /** - * Replaces the pixels in the specified area with pixel data - * from the supplied array. - * - * Params: - * area = Location in the image to store the pixels. - * pixels = An array of pixels defined by map. - * map = This character string can be any combination - * or order of R = red, G = green, B = blue, A = - * alpha, C = cyan, Y = yellow, M = magenta, and K = black. - * The ordering reflects the order of the pixels in - * the supplied pixel array. - */ - void importPixels(T)(Geometry area, T[] pixels, string map = "RGBA") - { - StorageType storage = getStorageType!(T); - - ImportImagePixels(imageRef, - area.xOffset, area.yOffset, - area.width, area.height, - toStringz(map), storage, pixels.ptr); - - DMagickException.throwException(&(imageRef.exception)); - } - - /** * Read an Image by reading from the file or * URL specified by filename with the specified size. * Usefull for images that don't specify their size. |
