このページは2007年 11月 14日, 18:58に更新されました by BrigetteK

ImageMagick

From $1

This library contains functions for manipulating images.  関連リンク: Extension Overview, DekiScript Overview, Extension Demos.

Assembly: mindtouch.deki.services
SID: http://services.mindtouch.com/deki/d...06/imagemagick

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.

  1. image.blend
  2. image.blur
  3. image.charcoal
  4. image.emboss
  5. image.fittosize
  6. image.flip
  7. image.flop
  8. image.outline
  9. image.paint
  10. image.polaroid
  11. image.raise
  12. image.resize
  13. image.rotate
  14. image.sink
  15. image.slideshow
  16. image.swirl
  17. image.vignette
  18. 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") }}

./ImageBlend1.JPG

To embed an imaged with both blend and resize effects:

{{ image.resize( image.blend("http://wiki.opengarden.org/@api/deki/files/1154"), 50, 100) }}

./ImageBlend2.JPG


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") }}

./ImageBlur1.JPG


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") }}

./ImageCharcoal1.JPG

To embed an image with a kernel size 5 charcoal effect:

{{ image.charcoal("http://wiki.opengarden.org/@api/deki/files/1154", 5) }}

./ImageCharcoal2.JPG


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") }}

./ImageEmboss1.JPG

To embed an image with a radius size 5 charcoal effect:

{{ image.emboss("http://wiki.opengarden.org/@api/deki/files/1154", 5) }}

./ImageEmboss2.JPG


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) }}

./ImageFitToSize1.JPG

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) }}

./ImageFitToSize2.JPG


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") }}

./ImageFlip1.JPG


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") }}

./ImageFlop1.JPG

To embed an image that is flipped vertically then horizonally:

{{ image.flop(image.flip("http://wiki.opengarden.org/@api/deki/files/1154")) }}

./ImageFlop2.JPG


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") }}

./ImageOutline1.JPG


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") }}

./ImagePaint1.JPG


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") }}

./ImagePolaroid1.JPG

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") }}


./ImagePolaroid2.JPG

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") }}


./ImagePolaroid3.JPG


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") }}

./ImageRaise1.JPG

To embed an image with a border width 3 raise effect:

{{ image.raise("http://wiki.opengarden.org/@api/deki/files/1154", 3) }}


./ImageRaise2.JPG


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) }}

./ImageResize1.JPG


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) }}

./ImageRotate1.JPG

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) }}


./ImageRotate2.JPG


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") }}

./ImageSink1.JPG

To embed an image with a border width 3 sink effect:

{{ image.sink("http://wiki.opengarden.org/@api/deki/files/1154", 3) }}


./ImageSink2.JPG


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) }}

./Slideshow.gif


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") }}

./ImageSwirl1.JPG

To embed an image with a 180 degree swirl effect:

{{ image.swirl("http://wiki.opengarden.org/@api/deki/files/1154", 180) }}


./ImageSwirl2.JPG


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") }}

./ImageVignette1.JPG


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") }}

./ImageWave1.JPG

ファイルサイズ日付添付したユーザ 
 ImageBlend1.JPG
説明なし
2.18 kB2007年 10月 18日, 22:10BrigetteKアクション
 ImageBlend2.JPG
説明なし
1947 バイト2007年 10月 18日, 22:10BrigetteKアクション
 ImageBlur1.JPG
説明なし
2047 バイト2007年 10月 18日, 22:16BrigetteKアクション
 ImageCharcoal1.JPG
説明なし
2.08 kB2007年 10月 18日, 22:22BrigetteKアクション
 ImageCharcoal2.JPG
説明なし
2.14 kB2007年 10月 18日, 22:22BrigetteKアクション
 ImageEmboss1.JPG
説明なし
3.48 kB2007年 10月 18日, 22:28BrigetteKアクション
 ImageEmboss2.JPG
説明なし
3.35 kB2007年 10月 18日, 22:28BrigetteKアクション
 ImageFitToSize1.JPG
説明なし
1605 バイト2007年 10月 18日, 22:35BrigetteKアクション
 ImageFitToSize2.JPG
説明なし
1622 バイト2007年 10月 18日, 22:35BrigetteKアクション
 ImageFlip1.JPG
説明なし
2.46 kB2007年 10月 18日, 22:39BrigetteKアクション
 ImageFlop1.JPG
説明なし
2.52 kB2007年 10月 18日, 22:43BrigetteKアクション
 ImageFlop2.JPG
説明なし
2.54 kB2007年 10月 18日, 22:43BrigetteKアクション
 ImageOutline1.JPG
説明なし
2.21 kB2007年 10月 18日, 23:09BrigetteKアクション
 ImagePaint1.JPG
説明なし
2.67 kB2007年 10月 18日, 23:14BrigetteKアクション
 ImagePolaroid1.JPG
説明なし
2.87 kB2007年 10月 18日, 23:51BrigetteKアクション
 ImagePolaroid2.JPG
説明なし
3.52 kB2007年 10月 18日, 23:51BrigetteKアクション
 ImagePolaroid3.JPG
説明なし
5.37 kB2007年 10月 18日, 23:51BrigetteKアクション
 ImageRaise1.JPG
説明なし
2.56 kB2007年 10月 18日, 23:57BrigetteKアクション
 ImageRaise2.JPG
説明なし
2.53 kB2007年 10月 18日, 23:57BrigetteKアクション
 ImageResize1.JPG
説明なし
2.41 kB2007年 10月 19日, 00:01BrigetteKアクション
 ImageRotate1.JPG
説明なし
2.37 kB2007年 10月 19日, 00:06BrigetteKアクション
 ImageRotate2.JPG
説明なし
1417 バイト2007年 10月 19日, 00:06BrigetteKアクション
 ImageSink1.JPG
説明なし
2.4 kB2007年 10月 19日, 00:11BrigetteKアクション
 ImageSink2.JPG
説明なし
2.5 kB2007年 10月 19日, 00:11BrigetteKアクション
 ImageSwirl1.JPG
説明なし
2.31 kB2007年 10月 19日, 01:43BrigetteKアクション
 ImageSwirl2.JPG
説明なし
2.4 kB2007年 10月 19日, 01:43BrigetteKアクション
 ImageVignette1.JPG
説明なし
1995 バイト2007年 10月 19日, 01:57BrigetteKアクション
 ImageWave1.JPG
説明なし
2.44 kB2007年 10月 19日, 01:59BrigetteKアクション
 SampleImage.JPG
説明なし
2.28 kB2007年 10月 18日, 22:02BrigetteKアクション
Slideshow.gif
説明なし
9.96 kB2007年 10月 19日, 01:34BrigetteKアクション
コメント(0)
あなたはコメントを投稿するには ログイン しなければなりません。