This extension contains functions for manipulating images. Related Links: Extension Overview, DekiScript Overview, Extension Demos.
Assembly: mindtouch.deki.services
SID: http://services.mindtouch.com/deki/draft/2007/06/imagemagick
This service requires Deki Wiki 1.8.2 or later.
To enable this extension, follow these steps:
- Go to Service management in the Control Panel of your wiki.
- Under Add Service, click on Local, and select type Extension.
- Enter a description and the extension SID: http://services.mindtouch.com/deki/draft/2007/06/imagemagick
- Add any additional configuration settings that are required by the extension (see below).
- Click on add service.
Configuration:
Before
the ImageMagick service can be used, it must be configured with the
location of the ImageMagick application. Download the latest version here.
| Config Key | Description |
| imagemagick-path | Path to convert application. |
Functions:
IMPORTANT: Function availability depends on the installed version of ImageMagick.
- image.blend
- image.blur
- image.charcoal
- image.emboss
- image.fittosize
- image.flip
- image.flop
- image.outline
- image.paint
- image.polaroid
- image.raise
- image.resize
- image.rotate
- image.sink
- image.slideshow
- image.swirl
- image.vignette
- image.wave
image.blend(image : uri) : uri
Generate image with a soft rectangular border.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
Samples:
| Output |
| To embed an image with the blend effect: {{ image.blend("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an imaged with both blend and resize effects: {{ image.resize( image.blend("http://wiki.opengarden.org/@api/deki/files/1154"), 50, 100) }} | |
|
image.blur(image : uri, radius : num, sigma : num) : uri
Blur image.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
radius
| num
| Optional. Radius (default: 0) |
sigma
| num
| Optional. Sigma (default: 1) |
Samples:
| Output |
| To embed an image with the default blur effect: {{ image.blur("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
image.charcoal(image : uri, kernel : num) : uri
Simulate image painted with charcoal.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
kernel
| num
| Optional. Kernel size, must be an odd number (default: 3) |
Samples:
| Output |
| To embed an image with the default charcoal effect: {{ image.charcoal("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an image with a kernel size 5 charcoal effect: {{ image.charcoal("http://wiki.opengarden.org/@api/deki/files/1154", 5) }} | |  |
image.emboss(image : uri, radius : num) : uri
Generate embossed image.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
radius
| num
| Optional. Radius (default: 1) |
Samples:
| Output |
| To embed an image with the default emboss effect: {{ image.emboss("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an image with a radius size 5 charcoal effect: {{ image.emboss("http://wiki.opengarden.org/@api/deki/files/1154", 5) }} | |  |
image.fittosize(image : uri, width : num, height : num) : uri
Fit image to dimensions and preserve its aspect ratio
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
width
| num
| Optional. Width (max: 500) |
height
| num
| Optional. Height (max: 500) |
Samples:
| Output |
| To embed an image that is fit a size of 50 by 50: {{ image.fittosize("http://wiki.opengarden.org/@api/deki/files/1154", 50, 50) }} | |  |
| To embed an image that is flipped verically and then fit to a size of 50 by 50: {{ image.fittosize( image.flip("http://wiki.opengarden.org/@api/deki/files/1154"), 50, 50) }} | |  |
image.flip(image : uri) : uri
Flip image vertically.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
Samples:
| Output |
| To embed an image that is flipped verically: {{ image.flip("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
image.flop(image : uri) : uri
Flip image horizontally.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
Samples:
| Output |
| To embed an image that is flipped horizontally: {{ image.flop("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an image that is flipped vertically then horizonally: {{ image.flop(image.flip("http://wiki.opengarden.org/@api/deki/files/1154")) }} | |  |
image.outline(image : uri) : uri
Generate outline of image.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
Samples:
| Output |
| To embed an image with the outline effect: {{ image.outline("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
image.paint(image : uri, radius : num) : uri
Simulate image painted with color blobs.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
radius
| num
| Optional. Radius (default: 1) |
Samples:
| Output |
| To embed an image with the paint effect: {{ image.paint("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
image.polaroid(image : uri, angle : num, caption : str) : uri
Generate image with white border and optional sub-title. This function is not supported on Debian.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
angle
| num
| Optional. Rotation angle (default: 3) |
caption
| str
| Optional. Caption (default: nil) |
Samples:
| Output |
| To embed an image with the default polaroid effect: {{ image.polaroid("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an image with a 15 degree rotation and MindTouch caption polaroid effect: {{ image.polaroid("http://wiki.opengarden.org/@api/deki/files/1154", 15, "MindTouch") }} | |
 |
| To embed an image with two 15 degree rotation and MindTouch caption polaroid effects: {{ image.polaroid(image.polaroid("http://wiki.opengarden.org/@api/deki/files/1154", 15, "MindTouch"), 15, "MindTouch") }} | |
 |
image.raise(image : uri, width : num) : uri
Generate image with a raised border.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
width
| num
| Optional. Border width (default: 8) |
Samples:
| Output |
| To embed an image with the default raise effect: {{ image.raise("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |
| To embed an image with a border width 3 raise effect: {{ image.raise("http://wiki.opengarden.org/@api/deki/files/1154", 3) }} | |
 |
image.resize(image : uri, width : num, height : num) : uri
Resize image to arbitrary dimensions.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri |
width
| num
| Optional. Width (max: 500) |
height
| num
| Optional. Height (max: 500) |
Samples:
| Output |
| To embed an image resized to 50 by 100: {{ image.resize("http://wiki.opengarden.org/@api/deki/files/1154", 50, 100) }} | |  |
image.rotate(image : uri, angle : num) : uri
Rotate image.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri. |
angle
| num
| Optional. Rotation angle. |
Samples:
| Output |
| To embed an image rotated by 15 degrees: {{ image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 15) }} | |
|
| To embed an image rotated by 15 degrees and resized to 50 by 50: {{ image.resize(image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 15), 50, 50) }} | |
 |
image.sink(image : uri, width : num) : uri
Generate image with a sunken border.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri. |
width
| num
| Optional. Border width (default: 8) |
Samples:
| Output |
| To embed an image with the default sink effect: {{ image.sink("http://wiki.opengarden.org/@api/deki/files/1154") }} | | |
| To embed an image with a border width 3 sink effect: {{ image.sink("http://wiki.opengarden.org/@api/deki/files/1154", 3) }} | |
 |
image.slideshow(uris : list, width : num, height : num, interval : num, effect : str) : xml
Embed a slideshow of images.
Parameters:
| Name | Type | Description |
uris
| list
| List of image URIs |
width
| num
| Optional. Slideshow width (default: 300px) |
height
| num
| Optional. Slideshow height (default: 300px) |
interval
| num
| Optional. Interval in seconds (default: 5.0) |
effect
| str
| Optional. Slideshow effect; one of {slideright, slideleft, slideup, squeezeleft, squeezeright, squeezeup, squeezedown, fadeout} (default: 'fadeout') |
Samples:
| Output |
| To embed a slideshow that displays an image at four rotation angles: {{ image.slideshow(
[image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 0),
image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 90),
image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 180),
image.rotate("http://wiki.opengarden.org/@api/deki/files/1154", 270)
], 50, 50, 2) }} | | |
image.swirl(image : uri, angle : num) : uri
Twist the image from the center outward.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri. |
angle
| num
| Optional. Swirl angle (default: 45) |
Samples:
| Output |
| To embed an image with the default swirl effect: {{ image.swirl("http://wiki.opengarden.org/@api/deki/files/1154") }} | | |
| To embed an image with a 180 degree swirl effect: {{ image.swirl("http://wiki.opengarden.org/@api/deki/files/1154", 180) }} | |
 |
image.vignette(image : uri, radius : num, sigma : num) : uri
Generate image with a soft oval border.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri. |
radius
| num
| Optional. Radius (default: 0) |
sigma
| num
| Optional. Sigma (default: 4) |
Samples:
| Output |
| To embed an image with the default vignette effect: {{ image.vignette("http://wiki.opengarden.org/@api/deki/files/1154") }} | | |
image.wave(image : uri, amplitude : num, length : num) : uri
Generate image with a wave.
Parameters:
| Name | Type | Description |
image
| uri
| Image uri. |
amplitude
| num
| Optional. Wave amplitude (default: 5) |
length
| num
| Optional. Wave length (default: 50) |
Samples:
| Output |
| To embed an image with the default wave effect: {{ image.wave("http://wiki.opengarden.org/@api/deki/files/1154") }} | |  |